defaultShortcuts property

Map<LogicalKeySet, Intent> defaultShortcuts

Generates the default shortcut key bindings based on the defaultTargetPlatform.

Used by WidgetsApp to assign a default value to WidgetsApp.shortcuts.

Implementation

static Map<LogicalKeySet, Intent> get defaultShortcuts {
  if (kIsWeb) {
    return _defaultWebShortcuts;
  }

  switch (defaultTargetPlatform) {
    case TargetPlatform.android:
    case TargetPlatform.fuchsia:
    case TargetPlatform.linux:
    case TargetPlatform.windows:
      return _defaultShortcuts;
    case TargetPlatform.macOS:
      return _defaultMacOsShortcuts;
    case TargetPlatform.iOS:
      // No keyboard support on iOS yet.
      break;
  }
  return <LogicalKeySet, Intent>{};
}