Results for “ColorScheme”
Full-text search across Boring Doc explanations, official documentation pages, the Flutter API index and every indexed version change.
API reference
- ColorSchemeclass
that can be used to configure the color properties of most components. material.ColorScheme ColorScheme Color Scheme class material
- ColorScheme.newconstructor
Create a ColorScheme instance from the given colors. material.ColorScheme.ColorScheme.new ColorScheme new Color Scheme.new constructor material
- ColorScheme.fromSeedconstructor
Generate a ColorScheme derived from the given seedColor. material.ColorScheme.ColorScheme.fromSeed ColorScheme fromSeed Color Scheme.from Seed constructor material
- ColorScheme.highContrastDarkconstructor
Create a high contrast ColorScheme based on the dark baseline Material 2 color scheme. material.ColorScheme.ColorScheme.highContrastDark ColorScheme highContrastDark Color Scheme.high Contrast Dark constructor material
- ColorScheme.lightconstructor
Create a light ColorScheme based on a purple primary color that matches the baseline Material 2 color scheme. material.ColorScheme.ColorScheme.light ColorScheme light Color Scheme.light constructor material
- ColorScheme.highContrastLightconstructor
Create a high contrast ColorScheme based on a purple primary color that matches the baseline Material 2 color scheme. material.ColorScheme.ColorScheme.highContrastLight ColorScheme highContrastLight Color Scheme.high Contrast Light
- ColorScheme.fromSwatchconstructor
Creates a color scheme from a MaterialColor swatch. material.ColorScheme.ColorScheme.fromSwatch ColorScheme fromSwatch Color Scheme.from Swatch constructor material
- ColorScheme.darkconstructor
dark color scheme that matches the baseline Material 2 color scheme. material.ColorScheme.ColorScheme.dark ColorScheme dark Color Scheme.dark constructor material
- material.DynamicSchemeVariantenum
algorithm used to construct a ColorScheme in ColorScheme.fromSeed. material.DynamicSchemeVariant DynamicSchemeVariant Dynamic Scheme Variant enum material
- ThemeData.fromconstructor
Create a ThemeData based on the colors in the given colorScheme and text styles of the optional textTheme. material.ThemeData.ThemeData.from ThemeData from Theme Data.from constructor material
Version changes
- Introduce new ColorScheme roles3.22.0breaking
color roles: `background`, `onBackground`, and `surfaceVariant`. The `ColorScheme` constructed by the updated `ColorScheme.fromSeed` method now generates different values compared to the previous version, adapting to the Material
- Migrating to Material 33.16.0breaking
values for `ThemeData.colorScheme` are updated to match the Material 3 Design spec. The `ColorScheme.fromSeed` constructor generates a `ColorScheme` derived from the given `seedColor`. The colors generated
- ThemeData's accent properties have been deprecated2.5.0deprecated
: theme.colorScheme.copyWith(secondary: myColor), ), //... ) ``` ### `accentColor` The closest backwards compatible [`ColorScheme`][] color is [`ColorScheme.secondary`][]. To hew most closely to the latest Material Design guidelines one can substitute `ColorScheme.primary
- Material 3 Tokens Update in Flutter3.27.0breaking
properties: The differences in the mappings of the color roles are small. Use `ColorScheme.copyWith` to revert to the original default colors: Code before migration: ```dart final ColorScheme
- - Fixes an issue in the `ColorScheme.fromSeed` method to respect the seed color even if the seed color is very bright.3.22.2bugfix
Fixes an issue in the `ColorScheme.fromSeed` method to respect the seed color even if the seed color is very bright
- 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
- Deprecated API removed after v3.103.13.0removed
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 Theme RawScrollbar Scrollbar ScrollbarThemeData CupertinoScrollbar Scrollbar.hoverThickness MaterialStateProperty
- fix: ColorScheme will removeListener on imageStream twice if there is error loading the image.3.38.0bugfix
ColorScheme will removeListener on imageStream twice if there is error loading the image. (Material, by @dkwingsmt). ColorScheme
- Deprecated API removed after v3.73.10.0removed
ThemeData( //... accentColor: Colors.blue, //... ); var color = myTheme.accentColor; ``` Code after migration: ```dart var myTheme = ThemeData( //... colorScheme: ColorScheme( //... secondary:Colors.blue, //... ), //... ); var color = myTheme.colorScheme.secondary; ``` **References** * [Accent color migration guide
- 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
- Material 3 tokens update3.41.0breaking
will have to manually set those properties to their desired color after generating. ColorScheme.fromSeed ColorScheme.fromImageProvider
- Page transitions replaced by ZoomPageTransitionsBuilder3.0.0breaking
target platforms. Code before migration: ```dart MaterialApp( theme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple)), ) ``` Code after migration: ```dart MaterialApp( theme: ThemeData( pageTransitionsTheme: const PageTransitionsTheme( builders: <TargetPlatform, PageTransitionsBuilder>{ TargetPlatform.android
- Deprecated API removed after v3.193.22.0removed
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 InteractiveViewer.alignPanAxis InteractiveViewer PanAxis
- FloatingActionButton and ThemeData's accent properties1.17.0breaking
after migration: ```dart MaterialApp( theme: ThemeData( floatingActionButtonTheme: FloatingActionButtonThemeData( foregroundColor: Colors.red, ), ), ) ``` FloatingActionButton ThemeData Theme ColorScheme FloatingActionButtons FloatingActionButtonTheme RawMaterialButton ThemeData.accentTextTheme FloatingActionButtonThemeData