scrumlab_keyboard_visibility 1.0.0+nullSafety copy "scrumlab_keyboard_visibility: ^1.0.0+nullSafety" to clipboard
scrumlab_keyboard_visibility: ^1.0.0+nullSafety copied to clipboard

Flutter plugin for discovering the state of the soft-keyboard visibility on Android and iOS.

keyboard_visibility #

Notification service for soft-keyboard visibility

Usage #

Add the dependency to your pubspec.yaml file in the root folder of your project. Look for the 'dependencies:'-line and add the following line after this line:

keyboard_visibility: 1.0.0+nullSafety

or

keyboard_visibility: ^[CURRENT VERSION NUMBER]

(Please note that the two spaces in the beginning of the line are important) Run 'flutter packages get' in your root folder after saving the pubspec.yaml file. For additional documentation about the pubspec.yaml file please refer to the official flutter documentation using packages

Import package:keyboard_visibility/keyboard_visibility.dart, instantiate KeyboardVisibilityNotification and use the Android and iOS notifications to get events about changes of the visibility of the soft-keyboard

The best practice to call the addNewListener function is inside the initState function as in the following example:

import 'package:keyboard_visibility/keyboard_visibility.dart';

@protected
void initState() {
  super.initState();

  KeyboardVisibilityNotification().addNewListener(
    onChange: (bool visible) {
      print(visible);
    },
  );
}

Also check out the example included with the package

Getting Started #

For help getting started with Flutter, view the following online documentation.

0
likes
115
pub points
11%
popularity

Publisher

unverified uploader

Flutter plugin for discovering the state of the soft-keyboard visibility on Android and iOS.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on scrumlab_keyboard_visibility