Results for “Migrating to Material 3”
Full-text search across Boring Doc explanations, official documentation pages, the Flutter API index and every indexed version change.
Version changes
- Migrating to Material 33.16.0breaking
work is also required to complete the migration. Prior to the 3.16 release, you could opt in to the Material 3 changes by setting the `useMaterial3` flag
- The ThemeData.useMaterial3 property is now set to true by default3.16.0breaking
look a little strange when you see it running with Material 3. To fix this, manually migrate to the new widgets, such as [`NavigationBar`][]. For more details, check
- Updated default text styles for menus3.16.0breaking
DropdownMenu`) is updated to match the Material 3 specification. A `MenuItemButton` for Material 3 uses `TextTheme.labelLarge` as the default text style. To use the previous default text style
- Introduce new ColorScheme roles3.22.0breaking
seedColor: Color(0xFF0000FF), // Bright blue ) ``` Code after migration: ```dart ColorScheme.fromSeed( seedColor: Color(0xFF0000FF), // Bright blue dynamicSchemeVariant: DynamicSchemeVariant.fidelity, ) ``` Material Design 3 removes 3 colors. To configure the appearance
- Material 3 Tokens Update in Flutter3.27.0breaking
The Material Design tokens updated the mapping of 4 color roles in
- ThemeData's toggleableActiveColor property has been deprecated3.7.0deprecated
Material widgets `Switch`, `SwitchListTile`, `Checkbox`, `CheckboxListTile`, `Radio`, `RadioListTile` now use `ColorScheme.secondary` color for their toggleable widget. `ThemeData.toggleableActiveColor` is deprecated and will eventually be removed. The widgets using `ThemeData.toggleableActiveColor
- SnackBar with action no longer auto-dismisses3.38.0breaking
until the user interacts with the action button. This change aligns with the Material 3 design specification for the `SnackBar` component: A `SnackBar` with an action button
- Customize tabs alignment using the new TabBar.tabAlignment property3.16.0breaking
Material 3 `TabBar` places tabs. The `TabAlignment` enum has the following values: A Material 3 scrollable `TabBar` uses `TabAlignment.startOffset` as the default tab alignment. This aligns the tabs