build method

  1. @override
Widget build(
  1. BuildContext context
)
override

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,
  );
}