Lets Flutter take control over the iOS soft keyboard position. This allows for a smoother UI experience and lets you swipe the keyboard away too!
So far it's just a proof of concept and not production ready and is meant to inspire you all. Please don't hesitate to improve on this. For now I don't really have much time to improve it myself unfortunately.
To install:
- wrap the widget around a Scaffold and set its avoidBottomViewInsets to false
- add the Swift code inside the AppDelegate class in AppDelegate.swift
Make sure you have textfield or something that triggers the on screen keyboard. You should be able to swipe the keyboard away, just make sure you start swiping from outside the keyboard.
Here the keyboard bounces using a Flutter bounce curve. You can easily choose you own curve of course:
In this example you need to drag past half way to trigger a close, or else it bounces back: