keyboardDismiss static method
- @Deprecated('Use `Keyboard.close()` instead.')
- BuildContext context, {
- bool ifRemovesFocus = true,
Closes the keyboard.
If ifRemovesFocus is true (the default) it also removes focus from whatever widget has it.
Implementation
@Deprecated('Use `Keyboard.close()` instead.')
static void keyboardDismiss(BuildContext context, {bool ifRemovesFocus = true}) {
if (ifRemovesFocus) FocusScope.of(context).requestFocus(FocusNode());
SystemChannels.textInput.invokeMethod<dynamic>('TextInput.hide');
}