keyboard_utils 0.0.1
keyboard_utils: ^0.0.1 copied to clipboard
A new Flutter plugin for check visibility keyboard.
keyboard_utils #
A Flutter plugin for check the keyboard visibility.
[sample]
Install #
Add the dependency to your pubspec.yaml
keyboard_utils: ^[CURRENT_VERSION]
How to use #
Add the imports:
import 'package:keyboard_utils/keyboard_utils.dart';
import 'package:keyboard_utils/keyboard_listener.dart';
Create the KeyboardUtils:
KeyboardUtils _keyboardUtils = KeyboardUtils();
Attach the listener to KeyboardUtils:
_keyboardUtils.add(listener: KeyboardListener(
willHideKeyboard: () {
_streamController.sink.add(_keyboardUtils.keyboardHeight);
},
willShowKeyboard: (double keyboardHeight) {
_streamController.sink.add(keyboardHeight);
}
));
Check the sample for more details.