Shortcuts constructor Null safety

const Shortcuts(
  1. {Key? key,
  2. required Map<ShortcutActivator, Intent> shortcuts,
  3. required Widget child,
  4. String? debugLabel}
)

Creates a const Shortcuts widget that owns the map of shortcuts and creates its own manager.

When using this constructor, manager will return null.

The child and shortcuts arguments are required.

See also:

Implementation

const Shortcuts({
  super.key,
  required Map<ShortcutActivator, Intent> shortcuts,
  required this.child,
  this.debugLabel,
}) : _shortcuts = shortcuts,
     manager = null,
     assert(shortcuts != null),
     assert(child != null);