dvStudioActivate function

Map<Type, Action<Intent>> dvStudioActivate(
  1. VoidCallback onTap
)

The keys that press a focused control, on every platform.

Enter and Space are both here because Flutter binds them differently: the web binds Enter to ButtonActivateIntent and Space to ActivateIntent, every other platform binds Enter to ActivateIntent. Handling one of the two is a button that does nothing on the other platform, and the web is where Studio is mostly used.

Public because a control that draws itself rather than through DVStudioControl -- a rail item, a list row, a page card -- is still a control, and gets the same keys for the same reason.

Implementation

Map<Type, Action<Intent>> dvStudioActivate(VoidCallback onTap) =>
    <Type, Action<Intent>>{
      ActivateIntent: CallbackAction<ActivateIntent>(
        onInvoke: (ActivateIntent intent) {
          onTap();
          return null;
        },
      ),
      ButtonActivateIntent: CallbackAction<ButtonActivateIntent>(
        onInvoke: (ButtonActivateIntent intent) {
          onTap();
          return null;
        },
      ),
    };