build method
Build the widget.
Implementation
@override
Widget build(final BuildContext context) {
final func = onCancel;
return CallbackShortcuts(
bindings: {
const SingleActivator(LogicalKeyboardKey.escape): () {
if (func == null) {
Navigator.pop(context);
} else {
func();
}
},
},
child: child,
);
}