Skip to content

fix: Adapt to Flutter 3.47 - #3995

Merged
spydon merged 3 commits into
mainfrom
fix/flutter-3.47-compat
Aug 13, 2026
Merged

fix: Adapt to Flutter 3.47#3995
spydon merged 3 commits into
mainfrom
fix/flutter-3.47-compat

Conversation

@spydon

@spydon spydon commented Aug 13, 2026

Copy link
Copy Markdown
Member

Description

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 AnalysisOptionsMigration ignores include:, repeatedly rewriting analysis_options.yaml files that already inherit the exclusions 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.

Checklist

  • 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.
  • No, this PR is not a breaking change.

Related Issues

Related to flutter/flutter#191056

spydon added 3 commits August 13, 2026 22:23
- 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
spydon force-pushed the fix/flutter-3.47-compat branch from c8ce52c to d539f53 Compare August 13, 2026 20:24
@spydon spydon changed the title fix: Bump Flutter min version to 3.47.0 fix: Adapt to Flutter 3.47 Aug 13, 2026
@spydon
spydon merged commit 0453bad into main Aug 13, 2026
9 checks passed
@spydon
spydon deleted the fix/flutter-3.47-compat branch August 13, 2026 20:44
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants