Skip to content

chore(flutter): support Flutter 3.47.2 while keeping 3.27 and 3.35 working. - #2359

Open
TheNoumanDev wants to merge 6 commits into
mainfrom
flutter-3.47.2-upgrade
Open

chore(flutter): support Flutter 3.47.2 while keeping 3.27 and 3.35 working.#2359
TheNoumanDev wants to merge 6 commits into
mainfrom
flutter-3.47.2-upgrade

Conversation

@TheNoumanDev

Copy link
Copy Markdown
Member

Support Flutter 3.47.2

Upgrades the monorepo to Flutter 3.47.2 / Dart 3.13.2, without dropping the older SDKs
consuming apps still run.

3.27.4 3.38.7 3.47.2
resolve
analyze / test ✅ 0 errors, 206/206 ✅ 0 errors, 206/206
starter build ✅ web (--web-renderer html) ✅ web + android + iOS ✅ web + android + iOS

On 3.27.4, melos bootstrap reports that modules/auth / chat / ensemble_bluetooth would need
their collection / meta constraints downgraded. Those were left as-is — they are opt-in modules
the core runtime does not depend on, and the constraints predate this PR.

modules/ensemble now declares flutter: ">=3.27.0" (verified manually on all three above).
CI build.yml builds the starter on 3.38.7 + 3.47.2 (was ["3.38.7"]); every other workflow is
pinned to 3.47.2 (was 3.32.5 / floating stable).

What was blocking

  1. intl capped at <=0.20.2 in 4 pubspecs — 3.47.2's flutter_localizations needs ^0.20.3, so nothing resolved.
  2. describeEnum removed in 3.47 — called in framework/device.dart.
  3. font_awesome_flutter 10.x subclasses IconData, which 3.44 made final — 8 compile errors, broke 32 of 38 test files.
  4. Android toolchain below 3.47.2's error floor — AGP 8.9.1 (needs 8.11.1), Kotlin 2.1.10 (needs 2.2.20).

What was fixed

  • intl">=0.17.0 <=0.20.3" (spans 3.27's 0.19.0, 3.35's 0.20.2 and 3.47's ^0.20.3).
  • describeEnum(x)x.name.
  • font_awesome_flutter">=10.9.0 <12.0.0" + a _fa() shim so one file compiles against both 10.x (IconData) and 11.x (FaIconData.data). Pub picks 10.9.1 on Dart 3.6, 11.0.0 on Dart ≥3.9.
  • AGP → 8.11.1, Kotlin → 2.2.20, Java target → 17.
  • Deprecations migrated (each with its migration link in-line): dialogBackgroundColor, ThemeData.indicatorColor, ColorScheme.background/onBackground/surfaceVariant, dataRowHeight, copyWith(useMaterial3:), Color.alpha, share_plus, firebase_app_check providers.
  • CI: all 8 workflows pinned to 3.47.2; build.yml matrix widened to ["3.38.7", "3.47.2"].
  • Fixed a pre-existing bug: resolvedWebViewCookieBaseUrl didn't trim, failing its own test.

Deliberately kept deprecated where the replacement needs a newer SDK than we support —
cacheExtent, Matrix4.translate/scale, Color.value — each behind // ignore: + a
TODO(flutter-upgrade) naming the version that unlocks it. Same reason RadioRadioGroup is
not done: RadioGroup doesn't exist before 3.35, and we have to support 3.27; that's why these are not upgraded yet, and nothing is breaking currently.

Testing

  • 3 SDKs × (bootstrap + analyze + test) — all green.
  • Starter builds: Android APK, web (incl. --web-renderer html on 3.27.4), iOS.
  • Tested Kitchen Sink and the functionality of the files we changed.
  • Tested Sports App

Follow-ups (tickets)

  1. Migrate web code off dart:html/package:jspackage:web (12 files marked TODO(web-wasm)); once 3.27 support is dropped.
  2. RadioRadioGroup, once 3.27 support is dropped.
  3. SwiftPM in our own plugins — Firebase stops publishing to CocoaPods after Oct 2026.
  4. iOS UIScene lifecycle — not required now, but Apple enforces it for apps built with the iOS 27 SDK.

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.

1 participant