springBootStarterFlutterDebugIsolatesAutoConfiguration top-level property

  1. @AutoConfigurationModule(build: AutoConfigurationBuild('spring.flutter.debug.isolates.enabled'))
BeanModule springBootStarterFlutterDebugIsolatesAutoConfiguration
final

The task manager of the app's isolates and the engine's threads (debugIsolates), on and off by the action debug.isolates (⌘⇧I, or seven quick taps and an eighth held two seconds): a small table in the dock, and its tab in the debug panel with every value. The flutterEngineLoads bean is an IsolateLoadSource, so isolateLoads (and what else reads it: the actuator) has the engine's threads beside the isolates: raster, platform, io, and the frames' build times in main. Nothing is read or measured while neither the table nor the tab shows. The generator puts this module into the app by spring.flutter.debug.isolates.enabled: true always, false never (no code), not set debug and profile builds only.

Implementation

@AutoConfigurationModule(
  build: AutoConfigurationBuild('spring.flutter.debug.isolates.enabled'),
)
final BeanModule springBootStarterFlutterDebugIsolatesAutoConfiguration =
    BeanModule('springBootStarterFlutterDebugIsolatesAutoConfiguration', [
      BeanDefinition<FlutterEngineLoads>(
        name: 'flutterEngineLoads',
        types: const [FlutterEngineLoads, IsolateLoadSource],
        source: _debugSource,
        conditions: [_debugFeatureOn('isolates')],
        preDestroy: (loads) => loads.stop(),
        create: (_) => FlutterEngineLoads(),
      ),
      BeanDefinition<DebugIsolates>(
        name: 'debugIsolates',
        types: const [
          DebugIsolates,
          ChangeNotifier,
          Listenable,
          ShortcutHandler,
          KeyedShortcutHandler,
          DebugOverlay,
        ],
        source: _debugSource,
        conditions: [_debugFeatureOn('isolates')],
        create: (r) {
          final isolates = r.dependency<FlutterDebugProperties>().isolates;
          return DebugIsolates(
            loads: r.dependency<IsolateLoads>(),
            interval: isolates.interval,
            position: isolates.position,
          );
        },
      ),
      BeanDefinition<DebugIsolatesSection>(
        name: 'debugIsolatesSection',
        types: const [DebugIsolatesSection, DebugPanelSection, Ordered],
        source: _debugSource,
        conditions: [_debugFeatureOn('isolates')],
        create: (r) => DebugIsolatesSection(r.dependency<DebugIsolates>()),
      ),
      ..._debugDock,
    ]);