# Extension points — flutter/flutter

> Canonical page: https://codevetter.com/unpack/flutter/extension-points

# Extension points — flutter/flutter

Scanned commit acb8fd51143a49384799557cb1df6ecead61a55a (2026-09-22). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

The repo is built for extension at several layers. CLI: add a FlutterCommand subclass and register it in generateCommands(). DI: almost every service resolves through AppContext/globals, and runner.run accepts a per-type overrides map used for google3 and tests. Build: the BuildSystem runs Target subclasses registered via BuildTargets. Platform support: Feature flags + DevelopmentArtifacts + Device/DeviceDiscovery implementations (incl. custom-devices JSON config). Tool-side: an experimental ExtensionManager/ExtensionEntryPoint mechanism loads tool extensions (linux prototype wired in already). IDE surface: daemon Domains. Engine side: the embedder.h C API plus platform channels/MethodChannel for plugins, and dart_plugin_registrant for Dart-side plugin init.
- New CLI commands: subclass FlutterCommand (runner/flutter_command.dart), register an instance in the generateCommands() list in executable.dart — this is the single command table for the whole tool. — [packages/flutter_tools/lib/executable.dart#L231-373](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/executable.dart#L231-L373) [packages/flutter_tools/lib/src/runner/flutter_command.dart#L1-52](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/runner/flutter_command.dart#L1-L52)
- Feature flags: add a Feature constant and a getter on FeatureFlags; flags get a configSetting consumed by `flutter config` and gate artifacts/commands — documented in docs/contributing/Feature-flags.md. — [packages/flutter_tools/lib/src/features.dart#L15-135](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/features.dart#L15-L135) [docs/contributing/Feature-flags.md](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/docs/contributing/Feature-flags.md)
- Build steps: implement a Target subclass (inputs/outputs via Source patterns + a build action) and register it through the BuildTargets abstraction (BuildTargetsImpl in isolated/build_targets.dart overrides the interface). — [packages/flutter_tools/lib/src/build_system/build_system.dart#L55-100](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/build_system/build_system.dart#L55-L100) [packages/flutter_tools/lib/src/isolated/build_targets.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/isolated/build_targets.dart)
- Dependency injection: services are fetched with context.get<T>()/globals.* (base/context.dart, globals.dart) and runner.run takes an overrides map <Type, Generator> — executable.main already uses it for Logger, AnsiTerminal, WebRunnerFactory, DevtoolsLauncher, TemplateRenderer, PreRunValidator, BuildTargets. — [packages/flutter_tools/lib/executable.dart#L140-186](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/executable.dart#L140-L186) [packages/flutter_tools/lib/src/base/context.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/base/context.dart) [packages/flutter_tools/lib/src/globals.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/globals.dart)
- Tool extensions: ExtensionManager + ExtensionEntryPoint (experimental/extension_manager.dart, extension_discovery.dart) load external tool extensions; the linux prototype entry point is already wired into executable.main behind isToolExtensionsEnabled. — [packages/flutter_tools/lib/executable.dart#L114-135](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/executable.dart#L114-L135) [packages/flutter_tools/lib/src/experimental/extension_manager.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/experimental/extension_manager.dart) [packages/flutter_tools/lib/src/experimental/extension_discovery.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/experimental/extension_discovery.dart)
- New device types: implement Device + DeviceDiscovery under the device manager (flutter_device_manager.dart), or declare SSH-based custom devices consumed by CustomDevicesCommand and custom_devices config. — [packages/flutter_tools/lib/src/flutter_device_manager.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/flutter_device_manager.dart) [packages/flutter_tools/lib/src/commands/custom_devices.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/commands/custom_devices.dart) [packages/flutter_tools/lib/src/device.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/device.dart)
- Doctor/validators: DoctorValidator implementations are aggregated in doctor.dart workflows (android_workflow, iosWorkflow); AnalyzeCommand additionally accepts a list of ProjectValidator plugins (GeneralInfoProjectValidator, VariableDumpMachineProjectValidator). — [packages/flutter_tools/lib/src/doctor.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/doctor.dart) [packages/flutter_tools/lib/src/doctor_validator.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/doctor_validator.dart) [packages/flutter_tools/lib/executable.dart#L238-251](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/executable.dart#L238-L251)
- IDE daemon protocol: new RPC surfaces are added as Domain subclasses registered via registerDomain() in DaemonCommand (existing domains cover app, device, emulator, daemon, devtools). — [packages/flutter_tools/lib/src/commands/daemon.dart#L307-422](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/commands/daemon.dart#L307-L422)
- Hot-runner hooks: HotRunnerConfig exposes setupHotRestart/setupHotReload/updateDevFSComplete/runPreShutdownOperations overridable via context.get<HotRunnerConfig>() — used by embedders like google3 to customize reload behavior. — [packages/flutter_tools/lib/src/run_hot.dart#L37-68](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/run_hot.dart#L37-L68)
- Engine platform ports: implement the embedder.h C API (or a platform embedder under shell/platform/) and bridge platform channels; Dart-side plugins register through dart_plugin_registrant.dart. — [engine/src/flutter/shell/platform/embedder/embedder.h](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/engine/src/flutter/shell/platform/embedder/embedder.h) [packages/flutter/lib/src/dart_plugin_registrant.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter/lib/src/dart_plugin_registrant.dart) [packages/flutter/lib/src/services/platform_channel.dart#L291-418](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter/lib/src/services/platform_channel.dart#L291-L418)
- Project scaffolding: `flutter create` templates live in packages/flutter_tools/templates (app, module, plugin, package_ffi...) rendered through TemplateRenderer; ExtensionTemplateManager can add extension-provided templates. — [packages/flutter_tools/templates](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/templates) [packages/flutter_tools/lib/executable.dart#L123-135](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/executable.dart#L123-L135)
- Test infrastructure plugins: dev/bots suite runners follow the ShardRunner typedef — adding a shard means writing a run_*.dart under dev/bots/suite_runners and registering it in the selectShard map plus a matching .ci.yaml target. — [dev/bots/test.dart#L71-140](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/dev/bots/test.dart#L71-L140) [dev/bots/suite_runners](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/dev/bots/suite_runners) [.ci.yaml](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/.ci.yaml)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
