Skip to content

Upgrade to Flutter 3.50.1 / Dart 3.14 - #123

Merged
amaury901130 merged 7 commits into
mainfrom
chore/flutter-3.50
Dec 4, 2026
Merged

amaury901130 merged 7 commits into
mainfrom
chore/flutter-3.50

Conversation

@amaury901130

Copy link
Copy Markdown
Collaborator

Description

Upgrades the template from Flutter 3.47.5 / Dart 3.13.4 to Flutter 3.50.1 / Dart 3.14.0, the latest stable release. There is one commit per migration step:

  1. SDK and dependencies. .fvmrc is now 3.50.1. Constraints are sdk: ^3.14.0 and flutter: >=3.50.0. firebase_core goes to 5 and cupertino_icons to 2, with the latest minor versions elsewhere. Melos goes to 8.10.2, with a cli_launcher ^0.3.4+1 minimum: on Dart 3.14, older versions break every nested Melos command with "Could not find global installation of melos".
  2. Design libraries. Flutter 3.50 deprecates package:flutter/material.dart and cupertino.dart, which fails --fatal-infos. The code now uses material_ui and cupertino_ui (31+1 files, migrated with the official dart fix code).
  3. Localization. The discontinued intl_utils is replaced by Flutter's gen-l10n (app/l10n.yaml). Class S, generated/l10n.dart and the .arb files are unchanged, so call sites didn't change. The initializer now patches the new output, and I checked that its output is byte-identical to a regeneration. It also rejects app names containing { or }. This commit adds the first app test (localization delegates in English and Spanish).
  4. Android. Gradle 9.5.0, AGP 9.3.1 and Kotlin 2.4.20, the Flutter 3.50 template versions. 3.50 refuses AGP below 9.1.1; we were on 9.1.0.
  5. Web. index.html now uses the flutter_bootstrap.js loader; loadEntrypoint was deprecated.
  6. Docs. README (includes a new upgrade procedure and a summary of this upgrade), CLAUDE.md and docs/.
  7. iOS. Flutter's LLDB-init migration on the QA scheme, which the other schemes already had.

iOS needed no configuration change. The deployment target is already 15.0, the same as the 3.50 template, and Swift Package Manager handles Firebase iOS SDK 13. flutter_base.json still says "template".

Validation (local, Xcode 27.2, JDK 17 toolchain):

  • melos run verify: format, analyze (--fatal-infos) and test pass in all 5 packages (33 tests).
  • Android: debug APK and release App Bundle build without warnings. env/.dev is packaged; 3.50.0 dropped such files and 3.50.1 fixed it.
  • iOS: simulator debug, QA flavor, and release (--no-codesign) all build.
  • Web build passes without warnings.
  • The dev app launches with no exceptions on an iPhone 18 Pro simulator (iOS 27.2) and a Pixel 10 Pro XL emulator.

Not validated:

  • Signed iOS builds and real devices.
  • Linux, and running the web app in a browser.
  • This repository has no integration tests.

Issue

No linked issue.

Preview

No intended UI change. On both platforms the app launches to the onboarding screen and looks as before.

Notes:

🤖 Generated with Claude Code

amaury901130 and others added 7 commits December 3, 2026 10:15
- .fvmrc 3.47.5 -> 3.50.1; packages require sdk ^3.14.0, flutter >=3.50.0
- Major bumps: firebase_core 5 (Firebase Android SDK 35, iOS SDK 13),
  cupertino_icons 2; minor bumps for go_router, flutter_bloc, flutter_svg,
  shared_preferences, gap, flutter_dotenv, app_links, package_info_plus,
  bloc_test, build_runner, flutter_gen, lints
- Melos 8.10.2, and a cli_launcher ^0.3.4+1 floor: Dart 3.14 points
  Platform.script at the package source for `dart run`, and older
  cli_launcher versions then fail every nested melos exec with "Could not
  find global installation of melos". pubspec.lock is git-ignored, so the
  floor keeps existing checkouts off the broken version
- resolved_packages: add the new transitive packages (code_assets, hooks,
  jni, jni_util, listen, objective_c, record_use); drop gtk, no longer
  resolved (app_links now uses app_links_linux, as the regenerated Linux
  plugin registrant shows)

Analysis with --fatal-infos fails at this commit on Flutter 3.50's
deprecation of package:flutter/material.dart; the next commit migrates it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flutter 3.50 deprecates the in-framework design libraries
(package:flutter/material.dart, cupertino.dart) and the Material/Cupertino
localization delegates in flutter_localizations.

- Add material_ui ^1.12.0 (app, common) and cupertino_ui ^1.1.7 (app)
- Imports migrated with `dart fix --apply --code=migrate_design_widgets`
  (31 files in app, 1 in common)
- app.dart and lang_extensions.dart: take GlobalCupertinoLocalizations from
  cupertino_ui and only GlobalWidgetsLocalizations from flutter_localizations,
  as the migration guide prescribes; importing all of flutter_localizations
  next to material_ui is an ambiguous_import error

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
intl_utils is discontinued on pub.dev. Flutter's built-in generator
replaces it, configured in app/l10n.yaml to keep the existing API: class S,
generated/l10n.dart, non-nullable S.of(context), and the intl_*.arb files.
Nothing used S.current, S.maybeOf, S.load or the Intl.defaultLocale side
effect of the old generator.

- Remove intl_utils from app and common (common never used it) and the
  flutter_intl pubspec block; `melos run gen:l10n` runs `flutter gen-l10n`.
  With `generate: true` (already set), `flutter pub get` regenerates too;
  `format: true` keeps that output identical to the committed files
- Initializer: patch appName in l10n_<locale>.dart and l10n.dart with
  gen-l10n's escaping (verified byte-identical to a regeneration with
  quotes and accents); reject app names with `{` or `}`, which .arb
  messages treat as placeholders (appName would become a method and every
  S.of(context).appName call would stop compiling). Drop intl_utils from
  resolved_packages
- app/test: first app test, covering the localization delegates in English
  and Spanish (S strings, a placeholder message, Material localizations);
  registered in sonar.tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Flutter 3.50 raised the minimum Android build tools: it refuses AGP below
9.1.1 (we had 9.1.0) and Kotlin Gradle Plugin below 2.4.10 (we had 2.4.0).
Use the versions the Flutter 3.50.1 template generates
(flutter_tools/lib/src/android/gradle_utils.dart). The template still
sets android.newDsl=false and android.builtInKotlin=false, so they stay.
SDK levels are unchanged (compile 37, target 36, min 24).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`flutter build web` warned that FlutterLoader.loadEntrypoint is
deprecated. web/index.html now follows the Flutter 3.50 template
(flutter_bootstrap.js, mobile-web-app-capable, the commented viewport-fit
tag), keeping the title and apple-mobile-web-app-title lines the project
initializer edits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- README: toolchain versions, a "Latest upgrade" summary, a step-by-step
  Flutter upgrade procedure, and the material_ui import convention
- CLAUDE.md, overview, modules, feature, testing and project-initialization
  guides: Flutter 3.50.1 / Dart 3.14.0, Melos 8.10, Gradle 9.5.0 / AGP 9.3.1
  / Kotlin 2.4.20, gen-l10n, material_ui/cupertino_ui, the new app test
- known-issues: intl_utils resolved; list the localization dependencies
  common, domain and data declare without importing; #20 and #21 still
  apply on 3.50

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Flutter tool added customLLDBInitFile to the QA scheme the first time
it built the QA flavor, as it already had for the Runner and Dev schemes.
It enables Flutter's LLDB setup when debugging from Xcode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tarruk
tarruk self-requested a review December 4, 2026 13:12
@amaury901130
amaury901130 merged commit f14097e into main Dec 4, 2026
4 checks passed
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