wrap method

  1. @override
Widget wrap(
  1. CarpenterShellBuildContext context,
  2. Widget child
)
override

Оборачивает widget tree. Визуально shell-и применяются как middleware.

Implementation

@override
Widget wrap(CarpenterShellBuildContext context, Widget child) {
  return CarpenterHotkeyScope(
    commands: commands,
    onCommand: (command) {
      onCommand?.call(context.runtime, command);
    },
    controller: controller,
    platform: platform,
    enabled: enabled,
    trackPressedKeys: trackPressedKeys,
    autofocus: autofocus,
    child: child,
  );
}