https://github.com/Masum-MSNR/virtual_keypad/blob/1397e17648da4228f5fd6677bd1228a742aead00/lib/src/widgets/keyboard.dart#L138
Inside the pseudo code given here : #3, the bellow code was very useful.
It allow virtual keyboard to only be shown under a specific scope and so ignore parent inputs.
For kiosk app, this is not very useful but for our usecases inside the widgetbook it make sens.
void _openKeyboard() {
if (!mounted) return;
final focusedContext = FocusManager.instance.primaryFocus?.context;
final isInside =
focusedContext != null && focusedContext.findAncestorStateOfType<_VirtualKeyboardLayoutState>() == this;
if (!isInside) {
_closeKeyboard();
} else {
setState(() {
_isKeyboardOpen = true;
_keyboardType = _toKeyboardType(_tracker.configuration?.inputType);
_inputAction = _tracker.configuration?.inputAction;
});
}
}
https://github.com/Masum-MSNR/virtual_keypad/blob/1397e17648da4228f5fd6677bd1228a742aead00/lib/src/widgets/keyboard.dart#L138
Inside the pseudo code given here : #3, the bellow code was very useful.
It allow virtual keyboard to only be shown under a specific scope and so ignore parent inputs.
For kiosk app, this is not very useful but for our usecases inside the widgetbook it make sens.