Results for “ThemeData”
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
- 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
- TextSelectionTheme migration2.0.0breaking
`, you need to update them to use the new equivalent properties on `ThemeData.textSelectionTheme`: | Before | After | |--------------------------------------|-----------------------------------------------| | `ThemeData.cursorColor` | `TextSelectionThemeData.cursorColor` | | `ThemeData.textSelectionColor` | `TextSelectionThemeData.selectionColor` | | `ThemeData.textSelectionHandleColor` | `TextSelectionThemeData.selectionHandleColor` | **Code before migration:** ```dart ThemeData
- 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 indicator
- 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 background
- 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
- FloatingActionButton and ThemeData's accent properties1.17.0breaking
( floatingActionButtonTheme: FloatingActionButtonThemeData( foregroundColor: Colors.red, ), ), ) ``` FloatingActionButton ThemeData Theme ColorScheme FloatingActionButtons FloatingActionButtonTheme RawMaterialButton ThemeData.accentTextTheme FloatingActionButtonThemeData
- Component theme normalization updates3.35.0breaking
like 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
- 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
- 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
- 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
- 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
- Page transitions replaced by ZoomPageTransitionsBuilder3.0.0breaking
define 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
- 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
- Deprecated API removed after v3.133.16.0removed
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 TestWidgetsFlutterBinding TestPlatformDispatcher
- Deprecated API removed after v3.193.22.0removed
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
- Deprecate app bar color3.35.0deprecated
color: Colors.red, elevation: 2.0, ) // AppBarThemeData constructor AppBarThemeData( color: Colors.green, elevation: 4.0, ) // AppBarThemeData copyWith themeData.copyWith( color: Colors.purple, elevation: 2.0, ) ``` Code after migration: ```dart // AppBarTheme constructor AppBarTheme( backgroundColor: Colors.blue, elevation
- 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
- Updated Material 3 progress indicators3.29.0breaking
ProgressIndicatorThemeData.year2023` 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
- Component theme normalization3.27.0breaking
like 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
- Introduce new ColorScheme roles3.22.0breaking
migrated to `surfaceContainerHighest`. Code before migration: ```dart final ColorScheme colorScheme = ColorScheme(); MaterialApp( theme: ThemeData( //... colorScheme: colorScheme.copyWith( background: myColor1, onBackground: myColor2
- 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
- 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
- Updated Material 3 Slider3.29.0breaking
SliderThemeData.year2023` 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
- Migrate to standalone material_ui and cupertino_ui packagesunreleasedbreaking
The Material and Cupertino design libraries are now available as standalone packages
- New Buttons and Button Themes1.20.0breaking
A new set of basic material button widgets and themes have been