Repository navigation
fix: Adapt to Flutter 3.47 - #3995
Merged
Merged
Conversation
- Rewrite the flutter_gpu backend for the new async ShaderLibrary.fromAsset and the draw-time vertex/index counts - Convert pass-through constructor parameters to super parameters - Avoid assigning to a parameter in FlameAudio - Remove a redundant trailing zero flagged by DCM
spydon
force-pushed
the
fix/flutter-3.47-compat
branch
from
August 13, 2026 20:24
c8ce52c to
d539f53
Compare
erickzanardo
approved these changes
Aug 13, 2026
IstiN
pushed a commit
to IstiN/flutter_js_widget_runtime
that referenced
this pull request
Aug 14, 2026
flame_3d now resolves to IstiN/flame branch flame_3d-0.3.0-flutter-3.47 (backport of flame-engine/flame#3995 onto 0.3.0). Upstream has the fix in main but has not published it to pub.dev yet.
IstiN
pushed a commit
to IstiN/flutter_js_widget_runtime
that referenced
this pull request
Aug 14, 2026
…hing pub.dev rejects git dependencies in published packages. The Flutter 3.47 compatible build (IstiN/flame fork) lives on the flame-3.47 branch until flame-engine/flame#3995 is published upstream.
2 of 3 tasks
spydon
added a commit
that referenced
this pull request
Aug 16, 2026
Releases `flame_forge2d` 0.20.0, scoped to only this package so that the pending unreleased changes in `flame` and the other packages stay unreleased. New version: `flame_forge2d` 0.19.3+7 -> 0.20.0 Included changes: - **FIX**: Adapt to Flutter 3.47 (#3995) - **BREAKING** **FEAT**: Migrate flame_forge2d to the Box2D v3 based forge2d (#3952) The flame-side breaking changes that also touched this package's directory (#3968, #3961) only affected its tests and example, so they are intentionally left out of the changelog: they do not apply to flame_forge2d consumers until flame v2 is released. The package keeps its `flame: ^1.38.0` dependency, verified by resolving against the published flame 1.38.0 and forge2d 0.15.1 (`dart analyze` clean, all 91 tests pass, `flutter pub publish --dry-run` passes). Since melos refuses to version a package whose workspace dependency (`flame`) has pending changes outside the scope filter, the version bump, changelogs, and dependent constraint updates were applied manually in the same format melos generates. On merge, the `release-tag` workflow tags `flame_forge2d-v0.20.0` and triggers the publish workflow for it.
spydon
added a commit
that referenced
this pull request
Aug 26, 2026
Flutter 3.47.0 broke the CI pipeline (`analyze-latest` and `test`), this adapts the code to it without bumping the minimum supported Flutter or Dart SDK versions: - Rewrites the `flame_3d` flutter_gpu backend for the new flutter_gpu API: `ShaderLibrary.fromAsset` is now async, so shader bundles are preloaded from the `AssetManifest` during `GpuBackend.initialize()` (mirroring the WebGPU backend), and the vertex/index counts moved from `bindVertexBuffer`/`bindIndexBuffer` to `draw`/`drawIndexed`, so the render pass now records the counts at bind time and picks the right draw call. The committed shader bundles are also regenerated with the new SDK. - Since flame_3d now requires the latest stable again, the `analyze` job (lowest supported version) skips `flame_3d*` and it is instead only covered by `analyze-latest`, like we have done before when flutter_gpu has had breaking changes. - Converts pass-through constructor parameters to super parameters in the `flame` effects and `ColorTexture`, and avoids a parameter assignment in `FlameAudio`, fixing the new `use_super_parameters` and `parameter_assignments` diagnostics. - Commits the `analyzer.exclude` blocks that the Flutter 3.47 tool now generates into every package's `analysis_options.yaml` on each run (see flutter/flutter#191056), placed after the `include:` so the shared config stays first. Without committing them, every `flutter pub get`/`run`/`build` dirties the working tree. Verified locally on Flutter 3.47.0: repo-wide `dart analyze --fatal-infos`, `melos exec dart format . --set-exit-if-changed`, `dcm analyze .`, and `melos run test:select --no-select` (2854 passed, 0 failed) are all green, and `flutter pub get` no longer rewrites any `analysis_options.yaml`. (cherry picked from commit 0453bad)
IstiN
pushed a commit
to IstiN/flutter_js_widget_runtime
that referenced
this pull request
Sep 2, 2026
Hosted flame_3d 0.3.0 no longer compiles against the flutter_gpu API shipped with Flutter 3.47 stable (ShaderLibrary is async-loaded, bind calls no longer take counts), which broke every downstream host building on current stable — published packages cannot use git deps, so the flame-engine/flame#3995 backport (IstiN/flame fad05ce) is vendored: - lib/src/flame_3d_vendor/ — flame_3d 0.3.0 + fix, imports rewritten to the vendor path (see VENDOR.md for provenance and maintenance rules) - assets/flame_3d/shaders/ — shader bundles, pubspec-declared; keys rewritten accordingly - pubspec: drop flame_3d, declare its transitive deps (collection, meta, ordered_set, flutter_gpu), environment flutter >=3.47.0, version 0.4.110 - quality gates exclude the vendor dir (jscpd, lcov coverage, crap4dart); lcov 2.x needs --ignore-errors empty - CI moves 3.44.4 -> 3.47.1 everywhere; automerge-main.yml and the flame-3.47 branch are retired (endgame of the old two-track plan) No public API changes; all 540 tests and local gates pass on 3.47.1.
2 of 3 tasks
spydon
added a commit
that referenced
this pull request
Oct 3, 2026
…4089) # Description Users on the stable flame 1.38 line who upgrade to Flutter 3.47 could not build with `flame_3d` 0.3.0, because its flutter_gpu backend predates the API changes that #3995 adapted to, and the only published version with that fix, 0.4.0-dev.0, requires flame 2.0.0-dev.0. The fix for them is the `flame_3d` 0.3.1 and 0.3.2 hotfix releases cut from the `flame-v1.38.2` tag, which already contains the #3995 adaptation, on the branch `hotfix/flame_3d-v0.3.1`. 0.3.1 raised the `flutter` constraint to `>=3.47.0`, but the melos bootstrap step on CI synced the shared bootstrap environment back into the package before publishing, so it went out with `>=3.41.0`. 0.3.2 removes that sync on the hotfix branch and is published with the intended constraint. 0.3.1 should be retracted on pub.dev so that Flutter 3.41 to 3.46 users do not resolve it. This PR is the forward port of those releases to `main`, following the same approach as #4029 for flame_svg: it adds the 0.3.1 and 0.3.2 changelog entries so the history on `main` stays complete. The `flame_3d` version on `main` is already 0.4.0-dev.0, so no version bump is needed here. ## Checklist - [x] I have followed the [Contributor Guide] when preparing my PR. - [-] I have updated/added tests for ALL new/updated/fixed functionality. - [-] I have updated/added relevant documentation in `docs` and added dartdoc comments with `///`. - [-] I have updated/added relevant examples in `examples` or `docs`. ## Breaking Change? - [ ] Yes, this PR is a breaking change. - [x] No, this PR is not a breaking change. [Contributor Guide]: https://github.com/flame-engine/flame/blob/main/CONTRIBUTING.md
IstiN
pushed a commit
to IstiN/flutter_js_widget_runtime
that referenced
this pull request
Nov 6, 2026
Hosted flame_3d 0.3.0 no longer compiles against the flutter_gpu API shipped with Flutter 3.47 stable (ShaderLibrary is async-loaded, bind calls no longer take counts), which broke every downstream host building on current stable — published packages cannot use git deps, so the flame-engine/flame#3995 backport (IstiN/flame fad05ce) is vendored: - lib/src/flame_3d_vendor/ — flame_3d 0.3.0 + fix, imports rewritten to the vendor path (see VENDOR.md for provenance and maintenance rules) - assets/flame_3d/shaders/ — shader bundles, pubspec-declared; keys rewritten accordingly - pubspec: drop flame_3d, declare its transitive deps (collection, meta, ordered_set, flutter_gpu), environment flutter >=3.47.0, version 0.4.110 - quality gates exclude the vendor dir (jscpd, lcov coverage, crap4dart); lcov 2.x needs --ignore-errors empty - CI moves 3.44.4 -> 3.47.1 everywhere; automerge-main.yml and the flame-3.47 branch are retired (endgame of the old two-track plan) No public API changes; all 540 tests and local gates pass on 3.47.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Flutter 3.47.0 broke the CI pipeline (
analyze-latestandtest), this adapts the code to it without bumping the minimum supported Flutter or Dart SDK versions:flame_3dflutter_gpu backend for the new flutter_gpu API:ShaderLibrary.fromAssetis now async, so shader bundles are preloaded from theAssetManifestduringGpuBackend.initialize()(mirroring the WebGPU backend), and the vertex/index counts moved frombindVertexBuffer/bindIndexBuffertodraw/drawIndexed, so the render pass now records the counts at bind time and picks the right draw call. The committed shader bundles are also regenerated with the new SDK.analyzejob (lowest supported version) skipsflame_3d*and it is instead only covered byanalyze-latest, like we have done before when flutter_gpu has had breaking changes.flameeffects andColorTexture, and avoids a parameter assignment inFlameAudio, fixing the newuse_super_parametersandparameter_assignmentsdiagnostics.analyzer.excludeblocks that the Flutter 3.47 tool now generates into every package'sanalysis_options.yamlon each run (seeAnalysisOptionsMigrationignoresinclude:, repeatedly rewritinganalysis_options.yamlfiles that already inherit the exclusions flutter/flutter#191056), placed after theinclude:so the shared config stays first. Without committing them, everyflutter pub get/run/builddirties the working tree.Verified locally on Flutter 3.47.0: repo-wide
dart analyze --fatal-infos,melos exec dart format . --set-exit-if-changed,dcm analyze ., andmelos run test:select --no-select(2854 passed, 0 failed) are all green, andflutter pub getno longer rewrites anyanalysis_options.yaml.Checklist
docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Related Issues
Related to flutter/flutter#191056