1---2name: frb-upgrade-flutter3description: Upgrade flutter_rust_bridge to a new Flutter stable release. Use when changing Flutter/Dart versions, devcontainer Docker images, CI/post-release pins, generated Flutter scaffolds, or platform compatibility.4---56# 1 Start here78- Confirm the target Flutter stable release from official Flutter sources.9- Read `frb-dev-env` before running setup, generation, lint, or tests. Use its per-worktree local Docker workflow.10- Read `frb-upgrade-docker` when the target toolchain changes the development image.11- Read `frb-docker` for ordinary local Docker usage.12- Read `frb-code-generation` before accepting generated or scaffold drift.13- Read `frb-cargokit` before changing any copied CargoKit file. Read `frb-cargokit-dev` only when the source14 change belongs in the external CargoKit repository.15- Read `frb-pr-chain-split` as soon as an independently landable prerequisite or cleanup appears.16- Read `frb-prepare-pr` and then `frb-pr-review` before treating the upgrade PR as ready.17- Read `frb-fix-ci` when CI starts failing.1819# 2 Establish the version contract2021- Record the target Flutter version, bundled Dart version, release date, and relevant release-note changes.22- Distinguish the primary Dart version from the minimum supported Dart SDK floor.23 - Upgrade the primary Dart pin with Flutter.24 - Do not raise package SDK constraints merely because the primary toolchain is newer.25 - When retaining an older SDK floor, run dependency resolution, analysis, and tests on that floor in CI.26- Inventory version-like values without assuming the target Dart major or minor:2728```shell29rg -n "FRB_MAIN_|FLUTTER_VERSION|DART_VERSION|RUST_VERSION|setup-flutter|setup-dart|cirruslabs/flutter"30rg -n "flutter_rust_bridge_dev|stable|nightly|minimum.*version|deployment.*target" \31 .devcontainer .github tools frb_codegen frb_example32```3334- Inspect at least:35 - `.devcontainer/Dockerfile`;36 - `.github/workflows/ci.yaml` and `.github/workflows/post_release.yaml`;37 - `.github/workflows/publish_dev_docker.yaml`;38 - `tools/frb_internal/test/src/makefile_dart/test_dev_docker_metadata.dart`;39 - package `pubspec.yaml` and checked-in `pubspec.lock` files;40 - `frb_codegen/assets/integration_template/**`;41 - `tools/frb_internal/assets/apple_scaffold/**`;42 - `tools/tart_macos/**`;43 - `frb_example/**`.4445# 3 Choose PR boundaries before implementation4647- When the development image changes, make its upgrade the first independent predecessor PR targeting `master`.48 Follow `frb-upgrade-docker` for its contents, candidate image, merge order, and stable-tag promotion.49- Keep generated snapshots, their generator changes, required tests, and upgrade-specific compatibility migrations in50 the main upgrade PR.51- Split independent bug fixes, hardening, and reusable prerequisites into predecessor PRs according to52 `frb-pr-chain-split`.53- Build and maintain any predecessor chain exclusively with the official `gh stack` workflow described there.54- Put `ci-manual-dispatch` on dormant predecessors unless a predecessor specifically needs GitHub-only validation.55- Do not move incidental skill or workflow cleanup into the upgrade PR when it can stand alone against `master`.5657# 4 Upgrade the development toolchain5859- Complete the independent Docker predecessor through `frb-upgrade-docker` before relying on the upgraded image.60- Use its immutable candidate tag for pre-merge validation when necessary; never move `latest` from a PR branch.61- After the predecessor merges and publishes stable tags, merge latest `master` into the remaining upgrade chain and62 use the canonical version tag.63- If Apple pins, simulators, or host tooling change, continue with the Tart workflow routed by `frb-dev-env` and64 read `frb-tart-prepare` before provisioning or validation.6566# 5 Synchronize CI and post-release pins6768- Update the top-level toolchain values together in `.github/workflows/ci.yaml` and69 `.github/workflows/post_release.yaml`:70 - `FRB_MAIN_FLUTTER_VERSION`;71 - `FRB_MAIN_DART_VERSION`;72 - `FRB_MAIN_RUST_VERSION` when the upgraded tooling requires it;73 - `FRB_RUSTFMT_NIGHTLY_VERSION` only when formatting or nightly `rust-src` behavior requires it.74- Keep a retained minimum Dart floor explicit and independently exercised; do not substitute the primary Dart pin for75 that compatibility lane.76- Review Java, Android SDK/NDK, Chrome/chromedriver, macOS runner, simulator, Windows ARM, and post-release install-mode77 assumptions.7879# 6 Regenerate through owner workflows8081- Follow `frb-code-generation` for command selection, convergence, generated-output provenance, legacy scaffold migrations, and OHOS integrate composition.82- Follow `frb-cargokit` and `frb-cargokit-dev` for CargoKit ownership and synchronization.8384# 7 Validate in dependency order8586- Use the environment selected by `frb-dev-env`. When the Docker image changed, use the candidate or canonical image87 selected by `frb-upgrade-docker`; do not reuse a stale per-worktree container.88- Read `frb-lint` and `frb-test` for exact commands.89- Validate in this order:90 1. dev-image metadata and tool versions;91 2. Dart analysis, tests, and the retained minimum-SDK lane;92 3. internal generation and second-pass cleanliness;93 4. integration generation and CargoKit synchronization;94 5. focused legacy Android and Apple platform builds affected by migrations;95 6. representative native and web examples.96- Before creating or updating the PR, run `frb-prepare-pr`.97- Before declaring it ready, run the independent review gate in `frb-pr-review`.9899# 8 Triage CI and finish100101- Read `frb-fix-ci` before deep CI debugging.102- Triage failures in dependency order: environment setup, generation, integration, platform builds, post-release,103 then coverage or uploads.104- Compare platform failures with target-Flutter release notes and fresh scaffold output before adding workarounds.105- Keep full CI on the top upgrade PR. Follow `frb-pr-chain-split` for filtered or deferred predecessor CI.106- The Docker predecessor must already be merged and stably published through `frb-upgrade-docker`; do not defer image107 publication until the main Flutter upgrade PR merges.108109# 9 PR notes110111- Record old and new Flutter and primary Dart versions.112- Record the retained or raised minimum Dart SDK floor and its validation lane.113- List generated files, direct Flutter migrator edits, CargoKit changes, and OHOS overlays by provenance.114- Link predecessor PRs and identify which ones intentionally use manual CI.115- Record the fresh dev-image tag, exact local validations, generation convergence result, and CI status.116- Call out any platform-specific follow-up that remains intentionally out of scope.