flutter_interactive_keyboard 0.1.3 copy "flutter_interactive_keyboard: ^0.1.3" to clipboard
flutter_interactive_keyboard: ^0.1.3 copied to clipboard

outdated

A flutter plugin to dismiss the keyboard interactively similar to the IOS native behavior. On Android the functionality is mimed without drag.

pub package

Flutter Interactive Keyboard #

A way to mimic the IOS interactive dismissable keyboard in Flutter. If you're shipping to Android the behavior will sill be applied without animation due to the Android keyboard limitations.

This plugin is still in development, if you'd like to contribute PRs are welcomed.

How to use it #

The KeyboardManagerWidget defines the area where the drag is enabled, the touch are passed to the widget below in order to permit both scroll and drag to dismiss. The focusNode of the textfield is needed to manage the keyboard opening and closing.

See the full example to see a complete implementation.

KeyboardManagerWidget(
  focusNode: _focusNode,
  child: ListView.builder(
    itemCount: 100,
    itemBuilder: (context,index){
      return ListTile(
        title: Text("element $index"),
      );
    },
  ),
)

Advanced #

Change focusNode #

If your app has more than one TextField you can change the current FocusNode from the KeyboardManagerWidgetState as follows:

// Init variable
GlobalKey<KeyboardManagerWidgetState> _key = GlobalKey();

// In the build method
KeyboardManagerWidget(
  key: _key,
  ...
)

// Wherever you like
_key.currentState.substituteFocusNode = newFocusNode;
31
likes
0
pub points
62%
popularity

Publisher

unverified uploader

A flutter plugin to dismiss the keyboard interactively similar to the IOS native behavior. On Android the functionality is mimed without drag.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_interactive_keyboard