Closed gerfalcon closed 2 months ago
Hey, can I take up this issue?
Ofc @sasanktumpati, every help is appreciated! 🚀
I've landed @sasanktumpati'a PR, but I was holding off until the useMaterial3
parameter was deleted in master. It was a useful reminder to developers when reading the source that the rules had changed.
@domesticmouse Speaking about master
, I've raised a change related to the main flutter create
template. Could you help me by reviewing it?
I'd hold off on removing it from the template until the attribute is removed from MaterialApp
itself.
I understand your point, @domesticmouse. Additionally, it would be nice to know how many projects are using Material 3 and how many of them disable it.
My only concern is that this will increase the amount of cleanup required for the additional projects and samples.
I understand your point, @domesticmouse. Additionally, it would be nice to know how many projects are using Material 3 and how many of them disable it.
My only concern is that this will increase the amount of cleanup required for the additional projects and samples.
Flutter has a Deprecation Policy policy for handling this situation.
Given Material3 was made the default in 3.16 about three months ago, I'd be expecting it to be removed from Flutter in Q1 2025.
Teams that haven't migrated at that point will have to either migrate, or stay on the last build of Flutter that supports reverting to Material2.
On the cleanup front, dart fix
will do the vast majority of the work for us.
It was a great learning for me to be familiarized with the definition of the grace period. Thanks for the detailed explanation, @domesticmouse! 🙌
@domesticmouse , I've closed the issue related to the main template:
Problem
As of version
v3.16
, ThemeData.useMaterial3 is settrue
by default."We may not need this anymore" - @khanhnwin at the Observable Flutter #38 Google AI Dart SDK session
Steps to reproduce
ThemeData
in theMaterialApp()
contains theuseMaterial3: true
flag in its constructor.Expected results
``` dart return MaterialApp( title: 'Flutter Demo', theme: ThemeData( // This is the theme of your application. // // (...) colorScheme: ColorScheme.fromSeed(seedColor: Colors.green), ), home: const MyHomePage(title: 'Flutter Demo Home Page'), ); ```Actual results
``` dart return MaterialApp( title: 'Flutter Demo', theme: ThemeData( // This is the theme of your application. // // (...) colorScheme: ColorScheme.fromSeed(seedColor: Colors.green), useMaterial3: true, /// <-- TODO: Needs to be removed ), home: const MyHomePage(title: 'Flutter Demo Home Page'), ); ```flutter/samples that need to be updated:
Flutter Doctor output
Doctor output
```console Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.19.2, on macOS 12.6.2 21G320 darwin-arm64, locale en-AE) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [!] Xcode - develop for iOS and macOS (Xcode 13.4.1) ✗ Flutter requires Xcode 14 or higher. Download the latest version or update via the Mac App Store. ! CocoaPods 1.11.3 out of date (1.13.0 is recommended). CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To upgrade see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods for instructions. [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] IntelliJ IDEA Ultimate Edition (version 2023.3.4) [✓] Connected device (2 available) [✓] Network resources ! Doctor found issues in 1 category. ```Related issues: