Results for “Theme”
Full-text search across Boring Doc explanations, official documentation pages, the Flutter API index and every indexed version change.
Version changes
- ThemeData's accent properties have been deprecated2.5.0deprecated
ThemeData accentColor, accentColorBrightness, accentIconTheme and accentTextTheme properties have been deprecated. The ThemeData accentColor, accentColorBrightness, accentIconTheme and accentTextTheme properties have been deprecated because the Material library no longer uses
- Component theme normalization updates3.35.0breaking
these for a more consistent theming experience in the material library. In `ThemeData`: - The type of the `appBarTheme` property has been changed from `AppBarTheme` to `AppBarThemeData
- ThemeData's toggleableActiveColor property has been deprecated3.7.0deprecated
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` color
- Material Theme System Updates3.32.0breaking
overrides for the defaults of the component visual properties. Previously, the type of `ThemeData.cardTheme` was `Object?` to accept both `CardTheme` and `CardThemeData`. Now that the type has been
- Deprecate ThemeData.indicatorColor in favor of TabBarThemeData.indicatorColor3.32.0deprecated
ThemeData.indicatorColor` parameter was deprecated in favor of the `TabBarThemeData.indicatorColor` parameter. The `ThemeData.indicatorColor` is deprecated in favor of a component-specific theme. Use `TabBarThemeData` to override the default
- Component theme normalization3.27.0breaking
these for a more consistent theming experience in the material library. In `ThemeData`: - The type of the `cardTheme` property has been changed from `CardTheme` to `CardThemeData
- TextSelectionTheme migration2.0.0breaking
ThemeData` properties that controlled the look of selected text in Material widgets have been moved into their own `TextSelectionTheme`. These properties include `cursorColor`, `textSelectionColor`, and `textSelectionHandleColor`. The defaults
- The ThemeData.useMaterial3 property is now set to true by default3.16.0breaking
components, new component themes, and updated component visuals. As of this release, `ThemeData.useMaterial3` is set `true` by default. Prior to the 3.16 release, the changes were
- Deprecate ThemeData.dialogBackgroundColor in favor of DialogThemeData.backgroundColor3.29.0deprecated
ThemeData.dialogBackgroundColor` parameter was deprecated in favor of the `DialogThemeData.backgroundColor` parameter. The `ThemeData.dialogBackgroundColor` is deprecated in favor of a component-specific theme. Use `DialogThemeData` to override the default
- Migrating to Material 33.16.0breaking
removed as part of Flutter's deprecation policy. ### Colors The default values for `ThemeData.colorScheme` are updated to match the Material 3 Design spec. The `ColorScheme.fromSeed` constructor generates
- FloatingActionButton and ThemeData's accent properties1.17.0breaking
Removed Flutter's `FloatingActionButton` (FAB) dependency on `ThemeData` accent properties. Previously, the `accentIconTheme` provided a default for the `FloatingActionButton`'s `foregroundColor` property: This was a small part
- New Buttons and Button Themes1.20.0breaking
basic material button widgets and themes have been added to Flutter. The original classes have been deprecated and will eventually be removed. The overall goal
- Introduce new ColorScheme roles3.22.0breaking
surfaceContainerHighest`. Code before migration: ```dart final ColorScheme colorScheme = ColorScheme(); MaterialApp( theme: ThemeData( //... colorScheme: colorScheme.copyWith( background: myColor1, onBackground: myColor2
- Deprecated API removed after v3.103.13.0removed
that reached end of life after the 3.10 stable release have been removed. ThemeData.fixTextFieldOutlineLabel ThemeData OverscrollIndicatorNotification.disallowGlow StretchingOverscrollIndicator GlowingOverscrollIndicator OverscrollIndicatorNotification ColorScheme.primaryVariant ColorScheme.secondaryVariant ColorScheme.primaryContainer ColorScheme.secondaryContainer ColorScheme ThemeData.primaryColorBrightness Brightness ThemeData.primaryColor ThemeData.brightness
- Deprecated API removed after v3.73.10.0removed
stable release have been removed. Code before migration: ```dart var myTheme = ThemeData( //... accentColor: Colors.blue, //... ); var color = myTheme.accentColor; ``` Code after migration: ```dart var myTheme = ThemeData( //... colorScheme: ColorScheme( //... secondary:Colors.blue
- Deprecate app bar color3.35.0deprecated
Code before migration: ```dart // AppBarTheme constructor AppBarTheme( color: Colors.blue, elevation: 4.0, ) // AppBarTheme copyWith theme.copyWith( color: Colors.red, elevation: 2.0, ) // AppBarThemeData constructor AppBarThemeData( color: Colors.green, elevation: 4.0, ) // AppBarThemeData copyWith themeData.copyWith
- Deprecate ButtonBar in favor of OverflowBar3.24.0deprecated
deprecated in favor of the more efficient `OverflowBar` widget. As a result, `ThemeData.buttonBarTheme` and `ButtonBarTheme` were also deprecated. - Replace `ButtonBar` widget with `OverflowBar` widget. - By default, `ButtonBar` aligns
- Page transitions replaced by ZoomPageTransitionsBuilder3.0.0breaking
builders explicitly for the target platforms. Code before migration: ```dart MaterialApp( theme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple)), ) ``` Code after migration: ```dart MaterialApp( theme: ThemeData( pageTransitionsTheme: const
- Add isDark, isLight, and isSystem getters to ThemeMode3.44.0new-feature
isDark, isLight, and isSystem getters to ThemeMode (Material, by @Turskyi). ThemeMode
- [Framework/Tool] Decouple preview theme imports3.47.0improvement
Framework/Tool] Decouple preview theme imports (Framework, by @bkonyi
- Update some comments to reflect theme normalization3.41.0docs
Update some comments to reflect theme normalization (Material, by @bleroux
- Update some comments related to theme normalization3.41.0docs
Update some comments related to theme normalization (Material, by @bleroux
- Update more comments related to theme normalization3.41.0docs
Update more comments related to theme normalization (Material, by @bleroux
- [ Widget Preview ] Rework UI and theming3.38.0tooling
Widget Preview ] Rework UI and theming (Tooling, by @bkonyi
- Update several comments related to theme normalization3.41.0docs
Update several comments related to theme normalization (Material, by @bleroux
- Update some BottomNavigationBar comments to reflect theme normalization3.41.0docs
Update some BottomNavigationBar comments to reflect theme normalization (Material, by @bleroux). BottomNavigationBar
- Fix PopupMenu does not update when PopupMenuTheme in Theme changes.3.38.0bugfix
PopupMenu does not update when PopupMenuTheme in Theme changes. (Material, by @ksokolovskyi). PopupMenu PopupMenuTheme
- Add tests for InputDecoration borders (M3 and theme normalization)3.38.0new-feature
tests for InputDecoration borders (M3 and theme normalization) (Material, by @bleroux). InputDecoration
- [a11y] Add support for high contrast themes in the a11y assessments app3.47.0new-feature
a11y] Add support for high contrast themes in the a11y assessments app (Material, by @hannah
- Removal of describeEnum3.47.0removed
instance itself. ```dart diff enum Theme { light, dark } - final theme = describeEnum(Theme.light); + Theme.light.name; ``` Landed in version: TBD In stable release: TBD Enum String
- Updated default text styles for menus3.16.0breaking
dart menuButtonTheme: MenuButtonThemeData( style: MenuItemButton.styleFrom( /// ... ), ), ``` Code after migration: ```dart MenuItemButton( style: MenuItemButton.styleFrom( textStyle: Theme.of(context).textTheme.bodyLarge, ), child: Text(MenuEntry.about.label), onPressed: () => _activate(MenuEntry.about), ), ``` ```dart menuBut
- The default page transition on Android is now PredictiveBackPageTransitionBuilder3.38.0breaking
support predictive back route transitions. Code before migration: ```dart return MaterialApp( theme: ThemeData( brightness: Brightness.light, // pageTransitionsTheme is the default. ), home: const MyFirstScreen(), ); ``` Code after migration
- Material 3 Tokens Update in Flutter3.27.0breaking
revert to the original default colors: Code before migration: ```dart final ColorScheme colors = ThemeData().colorScheme; ``` Code after migration: ```dart final ColorScheme colors = ThemeData().colorScheme.copyWith( onPrimaryContainer: const Color(0xFF21005D
- Updated Material 3 progress indicators3.29.0breaking
property to `false` in your `MaterialApp`: ```dart highlightLines=2 return MaterialApp( theme: ThemeData(progressIndicatorTheme: const ProgressIndicatorThemeData(year2023: false)), // ... LinearProgressIndicator( year2023: false, value: 0.5, ), // ... ``` To opt into
- Migrate to standalone material_ui and cupertino_ui packagesunreleasedbreaking
The Material and Cupertino design libraries are now available as standalone packages
- Deprecated API removed after v3.133.16.0removed
MaterialButtonWithIconMixin TextButton OutlinedButton ElevatedButton PlatformsViewsService PlatformViewsService TextSelectionOverlay SelectionOverlay.fadeDuration TextSelectionOverlay.fadeDuration SelectionOverlay RenderEditable ScrollBehavior MaterialScrollBehavior ThemeData GlowingOverscrollIndicator StretchingOvercrollIndicator ThemeData.useMaterial3 StretchingOverscrollIndicator PaintingBinding ImageProvider DecoderCallback PaintingBinding.instantiateImageCodec PaintingBinding.instantiateImageCodecFromBuffer ImageProvider.load ImageProvider.loadBuffer DecoderBufferCallback TestWindow WidgetTester
- Deprecated API removed after v3.193.22.0removed
life after the 3.19 stable release have been removed. TextTheme TextStyle ThemeData Color ThemeData.colorScheme BottomAppBarTheme ColorScheme CupertinoContextMenu.previewBuilder CupertinoContextMenu CupertinoContextMenu.animationOpensAt Scrollbar.showTrackOnHover Scrollbar ScrollbarThemeData.showTrackOnHover ScrollbarThemeData.trackVisibility ScrollbarThemeData MaterialState MaterialStateProperty KeepAliveHandle.release KeepAliveHandle
- Updated Material 3 Slider3.29.0breaking
property to `false` in your `MaterialApp`: ```dart highlightLines=2 return MaterialApp( theme: ThemeData(sliderTheme: const SliderThemeData(year2023: false)), // ... Slider( value: _value, onChanged: (value) { setState(() { _value = value; }); }, ), // ... ``` Slider
- Customize tabs alignment using the new TabBar.tabAlignment property3.16.0breaking
customize the alignment of tabs in a `TabBar`. When you set `TabBar.isScrollable` and `ThemeData.useMaterial3` to `true`, the tabs in a scrollable `TabBar` defaults to `TabAlignment.startOffset`. This aligns
- Deprecated API removed after v3.163.19.0removed
stable release have been removed. TextButton ElevatedButton OutlinedButton ButtonStyle TextButton.styleFrom ElevatedButton.styleFrom OutlinedButton.styleFrom ThemeData NavigatorState FocusScopeNode Navigator FocusScope WidgetsApp FocusNode FocusNode.enclosingScope PlatformMenuBar TextTheme WidgetInspectorService WidgetInspectorServiceExtensions
- Deprecated API removed after v2.103.0.0removed
ElevatedButtonTheme OutlinedButtonTheme ButtonStyle ButtonStyleButton ElevatedButtonThemeData OutlinedButtonThemeData TextButtonThemeData Scaffold SnackBar ScaffoldMessenger MaterialApp RectangularSliderTrackShape.disabledThumbGapWidth RectangularSliderTrackShape ThemeData TextSelectionThemeData RenderEditable.onSelectionChanged TextSelectionDelegate.textEditingValue TextSelectionDelegate.userUpdateTextEditingValue TextInputFormatter
- Nullable CupertinoTheme.brightness1.17.0breaking
descendants that are affected by this `CupertinoTheme`. CupertinoThemeData.brightness MediaQuery.platformBrightness Brightness.light CupertinoTheme.brightnessOf CupertinoThemeData CupertinoTheme ThemeData
- Annotations return local position relative to object1.17.0breaking
that contains that location. They are used to detect mouse events and the theme of app bars. Code that is actively using this local position is probably
- Added BuildContext parameter to TextEditingController.buildTextSpan2.0.0breaking
A `BuildContext` parameter was added to `TextEditingController.buildTextSpan`. With the `BuildContext` available, users
- Set default for SystemUiMode to Edge-to-Edge3.27.0breaking
Android manifest file (`your_app/android/app/src/main/AndroidManifest.xml`). Generally, styles are denoted by `@style` and help theme your app. Modify these default styles in your manifest file: ```xml title="AndroidManifest.xml