ShortcutsModifier constructor

const ShortcutsModifier({
  1. Key? key,
  2. Key? modifierKey,
  3. Widget? child,
  4. required Map<ShortcutActivator, Intent> shortcuts,
  5. 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 ShortcutsModifier({
  super.key,
  super.modifierKey,
  super.child,
  required Map<ShortcutActivator, Intent> shortcuts,
  this.debugLabel,
})  : _shortcuts = shortcuts,
      manager = null,
      assert(shortcuts != null);