# System map — flutter/flutter

> Canonical page: https://codevetter.com/unpack/flutter/system-map

# System map — flutter/flutter

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

The repo is a multi-language monorepo: shell entrypoints (bin/) bootstrap a Dart CLI (packages/flutter_tools), the Dart framework (packages/flutter) is the runtime library apps import, and the engine C++ code (engine/src/flutter) is built with GN and pinned external deps via DEPS. Runtime boundaries are: user shell -> flutter tool process -> device/emulator process running the engine -> Dart isolate running dart:ui + framework. Storage is the local bin/cache directory plus pub caches; external integrations are Google Cloud Storage artifact downloads, pub.dev, Gradle/Xcode toolchains, and the VM service protocol. CI is driven by LUCI via .ci.yaml which defers to dev/bots/test.dart shards; GitHub Actions only runs auxiliary checks.
- bin/flutter resolves its own path through symlinks via follow_links(), sources bin/internal/shared.sh, and calls shared::execute(); on Windows-like shells (MINGW/CYGWIN/MSYS) it execs flutter.bat instead. — [bin/flutter#L39-64](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/bin/flutter#L39-L64)
- shared::execute() in shared.sh computes FLUTTER_ROOT, runs update_engine_version.sh, downloads the Dart SDK via bin/internal/update_dart_sdk.sh when the snapshot stamp is stale, compiles bin/cache/flutter_tools.snapshot with `dart --snapshot-kind=app-jit`, then execs the snapshot. — [bin/internal/shared.sh#L118-283](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/bin/internal/shared.sh#L118-L283) [bin/internal/update_dart_sdk.sh](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/bin/internal/update_dart_sdk.sh)
- Snapshot invalidation is keyed on `git rev-parse HEAD` + FLUTTER_TOOL_ARGS stored in flutter_tools.stamp, and on pubspec.yaml being newer than pubspec.lock; updates are serialized with a flock/shlock/mkdir lock on fd 7 at bin/cache/.upgrade_lock. — [bin/internal/shared.sh#L124-180](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/bin/internal/shared.sh#L124-L180) [bin/internal/shared.sh#L48-113](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/bin/internal/shared.sh#L48-L113)
- The Dart-side tool entrypoint is packages/flutter_tools/bin/flutter_tools.dart, which just calls executable.main() in lib/executable.dart; main() builds a context overrides map and the command list via generateCommands(), then calls runner.run(). — [packages/flutter_tools/bin/flutter_tools.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/bin/flutter_tools.dart) [packages/flutter_tools/lib/executable.dart#L78-188](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/executable.dart#L78-L188) [packages/flutter_tools/lib/executable.dart#L231-373](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/executable.dart#L231-L373)
- runner.run() wraps execution in runInContext and runZonedGuarded, bootstraps ToolDependencies from ~35 globals (fs, platform, processManager, xcode, androidSdk, cache, analytics...), constructs FlutterCommandRunner, registers commands, and funnels all errors through _handleToolError. — [packages/flutter_tools/lib/runner.dart#L32-199](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/runner.dart#L32-L199)
- The repo is a pub workspace: root pubspec.yaml lists ~70 workspace members spanning packages/*, dev/*, and examples/*, so a single pub get resolves the whole tree. — [pubspec.yaml#L1-80](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/pubspec.yaml#L1-L80)
- The engine lives in-repo under engine/src/flutter with a GN build (engine/src/flutter/BUILD.gn); third-party revisions (dart_revision, skia_revision, clang_version, reclient) are pinned in DEPS and synced with gclient. — [engine/src/flutter/BUILD.gn](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/engine/src/flutter/BUILD.gn) [DEPS#L1-60](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/DEPS#L1-L60)
- The Dart<->C++ runtime boundary is dart:ui in engine/src/flutter/lib/ui: functions in hooks.dart are annotated @pragma('vm:entry-point') and are invoked directly by the engine (e.g. _runMain, _addView) to deliver platform events into PlatformDispatcher. — [engine/src/flutter/lib/ui/hooks.dart#L7-80](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/engine/src/flutter/lib/ui/hooks.dart#L7-L80) [engine/src/flutter/lib/ui/platform_dispatcher.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/engine/src/flutter/lib/ui/platform_dispatcher.dart)
- The embedder boundary is a stable C API in engine/src/flutter/shell/platform/embedder/embedder.h, with per-platform embedders under shell/platform/{android,darwin,windows,linux,fuchsia}; Android's embedder is the Java io.flutter.embedding.engine.FlutterEngine. — [engine/src/flutter/shell/platform/embedder/embedder.h](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/engine/src/flutter/shell/platform/embedder/embedder.h) [engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java) [engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngine.h](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/engine/src/flutter/shell/platform/darwin/ios/framework/Headers/FlutterEngine.h)
- Prebuilt engine artifacts are downloaded by packages/flutter_tools/lib/src/cache.dart from https://storage.googleapis.com (realm- and FLUTTER_STORAGE_BASE_URL-adjustable), organized by DevelopmentArtifact values gated behind Feature flags, and stamped under bin/cache. — [packages/flutter_tools/lib/src/cache.dart#L43-120](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/cache.dart#L43-L120) [packages/flutter_tools/lib/src/cache.dart#L537-590](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/packages/flutter_tools/lib/src/cache.dart#L537-L590)
- CI source of truth is .ci.yaml (~7800 lines) consumed by LUCI/Cocoon; the flutter_drone recipe defers to dev/bots/test.dart with the shard key; GitHub workflows like tool-test-general.yml only run focused checks (e.g. SHARD=tool_tests SUBSHARD=general). — [.ci.yaml#L1-14](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/.ci.yaml#L1-L14) [.github/workflows/tool-test-general.yml#L1-35](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/.github/workflows/tool-test-general.yml#L1-L35) [dev/bots/test.dart#L87-140](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/dev/bots/test.dart#L87-L140)
- Physical-device end-to-end testing runs through dev/devicelab with its own task runner (dev/devicelab/bin/run.dart) and task library. — [dev/devicelab/bin/run.dart](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/dev/devicelab/bin/run.dart) [dev/devicelab/lib/framework](https://github.com/flutter/flutter/blob/acb8fd51143a49384799557cb1df6ecead61a55a/dev/devicelab/lib/framework)

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)
