keyboard_service

Last updated:

0 purchases

keyboard_service Image
keyboard_service Images
Add to Cart

Description:

keyboard service

keyboard_service #
Keyboard visibility / (auto-) dismiss package without the need of native plugin



Getting Started #
Use it for example when you want to automatically dimiss the on-screen keyboard when tapped outside of textfield.
And if you want know if the on-screen keyboard is visible and/or want to explicitly dismiss it.
There are 2 classes

'KeyboardService': Check if keyboard is visible and dismiss keyboard.
'KeyboardAutoDismiss': A widget that wraps a Scaffold widget for automatically dismissing the keyboard.

Also see example project
Wrap your top scaffold:
return KeyboardAutoDismiss(
scaffold: Scaffold(
appBar: AppBar(
title: Text('Keyboard Service Example'),
),
...
),
);
copied to clipboard
Use the service class if needed:
// Use method below to dismiss the keyboard
KeyboardService.dismiss();

// Use the optional BuildContext parameter to remove focus of a TextField
KeyboardService.dismiss(unfocus: context);

// Check if the keyboard is visible
KeyboardService.isVisible(context);

copied to clipboard
License #
This project is licensed under the MIT License - see the
license file for details.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.