NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
pub.dev, #1161 most downloaded on pub.dev
A Flutter package to use and make beautiful Material design based themes.
Latest stable
9.0.0
Last release 2 months ago
15 Sep 2026
Ships unpredictably
gaps range from 8 days to 10 months
Nearly every release is documented
notes for 46 of 46 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
66 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
> Except for removing deprecated APIs that no longer had any function in version 8.4, and fixing one package bug and one Themes Playground bug, this r…
September 15, 2026
The version requires Flutter 3.47.0 or higher. Offers support for SDK decoupled Material and Cupertino libraries.
Except for removing deprecated APIs that no longer had any function in version 8.4, and fixing one package bug and one Themes Playground bug, this release is a maintenance release to bring the package up to date with the latest Flutter SDK and other packages. Most notably full support for the standalone
material_uiandcupertino_uipackages.Now that Material UI development is no longer on hold and moving forward, development of new features and improvements to the package will resume. This version deliberately avoids any new FlexColorScheme features to ensure it is an easy upgrade from version 8.4, with main focus on support for the new standalone
material_uiandcupertino_uipackages. It depends on both at^1.0.0(any 1.x below 2.0.0) and does not use APIs added after 1.0.0; later FlexColorScheme releases will raise that floor when they adopt new features from those packages.
BREAKING
material_ui and cupertino_ui packages.FlexKeyColors.useExpressiveOnContainerColors to true when undefined, matching Flutter 3.47 ColorScheme.fromSeed and FlexSeedScheme 5 (MCU 0.13 tone 30 on-container colors). This changes onPrimaryContainer, onSecondaryContainer, onTertiaryContainer and onErrorContainer in light mode. Dark on-container tones were already tone 90 and do not change. Opt out with useExpressiveOnContainerColors: false to keep the older higher-contrast tone 10 light on-container colors. Flutter's ColorScheme.fromSeed has no such opt-out.surface / onSurface instead of background / onBackground on FlexColorScheme, FlexThemeData, FlexSchemeOnColors, and FlexSchemeSurfaceColors. surfaceVariant was also removed from FlexSchemeSurfaceColors. Matching unused alpha fields were removed from FlexAlphaValues.FlexSubThemesData flags useTextTheme, useFlutterDefaults, and blendTextTheme. Use useMaterial3Typography instead of useTextTheme.useFlutterDefaults from FlexSubThemes.bottomNavigationBarTheme, and unused useMaterial3 / useFlutterDefaults from navigationBarTheme and navigationRailTheme. bottomNavigationBarTheme still uses useMaterial3.FlexSubThemes.bottomNavigationBar pass-through alias. Use FlexSubThemes.bottomNavigationBarTheme.FlexColorScheme.createPrimarySwatch. Use ColorTools.createPrimarySwatch in package flex_color_picker.FIX
DOCS
.agents/skills/flex-color-scheme/SKILL.md.## [param] sections so dartdoc links resolve. Parameter-level comments are short summaries that use backticks instead of [Symbol] references.comment_references are resolved with @docImport on library directives, [Class.member] qualification, and backticks for literals, GoogleFonts, and removed APIs such as surfaceStyle / FlexSurface.CHORE
.gitignore and .pubignore after adopting the shared Flex package ignore files: stop tracking Flutter-generated desktop plugin registrant files that those ignores already exclude, ignore Android .kotlin/ compiler session files, and keep internal docs/ out of the published archive so pub does not treat it as package documentation.actions/checkout to v4 and codecov/codecov-action from end-of-life v3 to v5. Codecov now uses files: (the v3 file: input is ignored), fail_ci_if_error: true, and disable_search: true. The Test workflow runs on pull requests and pushes to master. The Deploy workflow sets override_branch: master so GitHub release uploads attach to the default branch.WEB_VERSION slug in .github/web-deploy.env (currently v9-0) instead of -latest. deploy.yml and deploy_playground.yml also publish the Themes Playground WASM GC build to Netlify.CHORE
lib/ coverage for FlexAdaptive, FlexInstantSplash, FlexSubThemes.menuButtonTheme, and the beta Shadcn palettes. Shadcn color tokens are now hex-locked like other built-in schemes; the feature remains beta.FIX
flex_color_scheme_to_theme_test.dart use the new textThemeFromGoogleFonts adapter function from google_fonts_text_theme.dart file. Needed becausegoogle_fonts still types TextTheme against package:flutter/material.dart, which is a different class than package:material_ui's TextTheme. The TextStyle is shared, so copying the styles is type-safe. This will be removed when google_fonts is updated to use package:material_ui's TextTheme.ColorScheme.fromSeed parity tests for MCU 0.13 expressive light on-container colors. Added a lock that useExpressiveOnContainerColors: false still produces the legacy tone 10 colors.NEW
CHANGE
ColorScheme.fromSeed. Generated theme code omits useExpressiveOnContainerColors when on (the new default) and emits useExpressiveOnContainerColors: false when off.blendTextTheme Playground persistence and code-generation comments. The TextTheme panel keeps a short notice that tinted TextTheme was removed in 9.0.FIX
package:material_ui/material_ui.dart and package:cupertino_ui/cupertino_ui.dart instead of package:flutter/material.dart and package:flutter/cupertino.dart.DOCS
themesplayground-v9-0 and older frozen paths). The -latest path is no longer used for new deploys.CHORE
Your coding agent can read these notes before it upgrades. Set up the MCP server →
> Except for removing deprecated APIs that no longer had any function in version 8.4, and fixing one package bug and one Themes Playground bug, this r…
September 15, 2026
The version requires Flutter 3.47.0 or higher. Offers support for SDK decoupled Material and Cupertino libraries.
Except for removing deprecated APIs that no longer had any function in version 8.4, and fixing one package bug and one Themes Playground bug, this release is a maintenance release to bring the package up to date with the latest Flutter SDK and other packages. Most notably full support for the standalone
material_uiandcupertino_uipackages.Now that Material UI development is no longer on hold and moving forward, development of new features and improvements to the package will resume. This version deliberately avoids any new FlexColorScheme features to ensure it is an easy upgrade from version 8.4, with main focus on support for the new standalone
material_uiandcupertino_uipackages. It depends on both at^1.0.0(any 1.x below 2.0.0) and does not use APIs added after 1.0.0; later FlexColorScheme releases will raise that floor when they adopt new features from those packages.
BREAKING
material_ui and cupertino_ui packages.FlexKeyColors.useExpressiveOnContainerColors to true when undefined, matching Flutter 3.47 ColorScheme.fromSeed and FlexSeedScheme 5 (MCU 0.13 tone 30 on-container colors). This changes onPrimaryContainer, onSecondaryContainer, onTertiaryContainer and onErrorContainer in light mode. Dark on-container tones were already tone 90 and do not change. Opt out with useExpressiveOnContainerColors: false to keep the older higher-contrast tone 10 light on-container colors. Flutter's ColorScheme.fromSeed has no such opt-out.surface / onSurface instead of background / onBackground on FlexColorScheme, FlexThemeData, FlexSchemeOnColors, and FlexSchemeSurfaceColors. surfaceVariant was also removed from FlexSchemeSurfaceColors. Matching unused alpha fields were removed from FlexAlphaValues.FlexSubThemesData flags useTextTheme, useFlutterDefaults, and blendTextTheme. Use useMaterial3Typography instead of useTextTheme.useFlutterDefaults from FlexSubThemes.bottomNavigationBarTheme, and unused useMaterial3 / useFlutterDefaults from navigationBarTheme and navigationRailTheme. bottomNavigationBarTheme still uses useMaterial3.FlexSubThemes.bottomNavigationBar pass-through alias. Use FlexSubThemes.bottomNavigationBarTheme.FlexColorScheme.createPrimarySwatch. Use ColorTools.createPrimarySwatch in package flex_color_picker.FIX
DOCS
.agents/skills/flex-color-scheme/SKILL.md.## [param] sections so dartdoc links resolve. Parameter-level comments are short summaries that use backticks instead of [Symbol] references.comment_references are resolved with @docImport on library directives, [Class.member] qualification, and backticks for literals, GoogleFonts, and removed APIs such as surfaceStyle / FlexSurface.CHORE
.gitignore and .pubignore after adopting the shared Flex package ignore files: stop tracking Flutter-generated desktop plugin registrant files that those ignores already exclude, ignore Android .kotlin/ compiler session files, and keep internal docs/ out of the published archive so pub does not treat it as package documentation.actions/checkout to v4 and codecov/codecov-action from end-of-life v3 to v5. Codecov now uses files: (the v3 file: input is ignored), fail_ci_if_error: true, and disable_search: true. The Test workflow runs on pull requests and pushes to master. The Deploy workflow sets override_branch: master so GitHub release uploads attach to the default branch.WEB_VERSION slug in .github/web-deploy.env (currently v9-0) instead of -latest. deploy.yml and deploy_playground.yml also publish the Themes Playground WASM GC build to Netlify.CHORE
lib/ coverage for FlexAdaptive, FlexInstantSplash, FlexSubThemes.menuButtonTheme, and the beta Shadcn palettes. Shadcn color tokens are now hex-locked like other built-in schemes; the feature remains beta.FIX
flex_color_scheme_to_theme_test.dart use the new textThemeFromGoogleFonts adapter function from google_fonts_text_theme.dart file. Needed becausegoogle_fonts still types TextTheme against package:flutter/material.dart, which is a different class than package:material_ui's TextTheme. The TextStyle is shared, so copying the styles is type-safe. This will be removed when google_fonts is updated to use package:material_ui's TextTheme.ColorScheme.fromSeed parity tests for MCU 0.13 expressive light on-container colors. Added a lock that useExpressiveOnContainerColors: false still produces the legacy tone 10 colors.NEW
CHANGE
ColorScheme.fromSeed. Generated theme code omits useExpressiveOnContainerColors when on (the new default) and emits useExpressiveOnContainerColors: false when off.blendTextTheme Playground persistence and code-generation comments. The TextTheme panel keeps a short notice that tinted TextTheme was removed in 9.0.FIX
package:material_ui/material_ui.dart and package:cupertino_ui/cupertino_ui.dart instead of package:flutter/material.dart and package:flutter/cupertino.dart.DOCS
themesplayground-v9-0 and older frozen paths). The -latest path is no longer used for new deploys.CHORE
Fixed deprecated Radio properties and used RadioGroup instead.
November 30, 2025
Requires at least Flutter 3.38.0, but prefer 3.38.1 or higher.
NEW
sliderYear2023 to FlexSubThemesData to be able to select between older M3 and newer current M3 slider styles. Defaults to older style as before to not break styles. Set sliderYear2023 to value false, to use the current newer M3 style.progressIndicatorTheme to FlexSubThemes to be able to theme CircularProgressIndicator and LinearProgressIndicator components.FlexSubThemesData added the properties:
progressIndicatorBaseSchemeColor (SchemeColor)progressIndicatorLinearTrackSchemeColor SchemeColor()progressIndicatorLinearMinHeight (double)progressIndicatorCircularTrackSchemeColor (SchemeColor)progressIndicatorRefreshBackgroundSchemeColor (SchemeColor)progressIndicatorLinearRadius (double)progressIndicatorStopIndicatorSchemeColor (SchemeColor)progressIndicatorStopIndicatorRadius (double)progressIndicatorStrokeWidth (double)progressIndicatorStrokeAlign (double)progressIndicatorTrackGap (double)progressIndicatorStrokeCap (StrokeCap)progressIndicatorConstraints (BoxConstraints)progressIndicatorCircularTrackPadding (EdgeInsetsGeometry)progressIndicatorYear2023 (bool)FlexSubThemes static function cardTheme added the parameters:
colorScheme (ColorScheme)backgroundSchemeColor (SchemeColor)borderSchemeColor (SchemeColor)borderWidth (double)FlexSubThemesData added the properties:
cardBackgroundSchemeColor (SchemeColor)cardBorderSchemeColor (SchemeColor)cardBorderWidth (double)CHANGE
FlexSliderIndicatorType got a new value rounded, to support selecting the newer M3 indicator style also in M2 and older M3 mode for Slider and RangeSlider.CHORE
flex_seed_scheme dependency to ^4.0.0.FlexSubThemes to be in their own files, to improve maintainability and reduce the size of flex_sub_themes.dart file. This also make it easier for LLMs to work on the component themes, as they now have smaller files to process.FlexSubThemes function and variable documentation. Add parameter docs to all component theme functions in the function header docs so they show up in API docs.NEW
The Slider panel got a new switch control to select between older M3 and newer current M3 slider styles. It uses the new FlexSubThemesData.sliderYear2023 property to do so.
Split the Tooltip and Progress Indicator panel into two separate panels.
The new Progress Indicator panel got theming controls for all supported new FlexSubThemesData progress indicator properties listed above.
The Card panel got theming controls for FlexSubThemesData card properties cardBackgroundSchemeColor, cardBorderSchemeColor, cardBorderWidth and cardElevation.
CHANGE
FIX
Radio properties and used RadioGroup instead.Minor fixes and improvements to the Themes Playground app only.
October 24, 2025
Minor fixes and improvements to the Themes Playground app only.
No changes
CHORE
CHANGE
device_frame_plus back to using original author's device_frame package.device_frame to the Themes Playground device frame selector.FIX
This release of FlexColorScheme adds support for breaking changes in Flutter v3.35.0 and also requires at least this version.
August 15, 2025
This release of FlexColorScheme adds support for breaking changes in Flutter v3.35.0 and also requires at least this version.
FIX
BottomAppBarTheme, see issue #283AppBarTheme, migrate to use new AppBarThemeData. For more information, see the discussion in #PR285InputDecorationTheme, migrate to use new InputDecorationThemeData. For more information, see the discussion in #PR285DropdownMenu's width issue #170970 so that the correct default width style for the DropdownMenu is retained. This issue affects Flutter 3.32.0 to at least Flutter 3.35.1. There is a fix PR in the master channel #PR169438, but it has not landed in Flutter 3.35.1. See also FCS issue report #286.CHORE
BottomAppBarThemeData API.AppBarThemeData API.InputDecorationThemeData API.FlexSubThemeData.sliderShowValueIndicator was changed from in Flutter 3.35 deprecated value ShowValueIndicator.always to ShowValueIndicator.onDrag, which is the new equivalent value in Flutter 3.35.FEATURE
DropdownMenu's maximum size.
FlexSubThemesData got the new property dropdownMenuMaximumSize.FlexSubThemes.dropdownMenuTheme got the new property maximumSize.WidgetStateProperty<Size?>?DropdownMenu width issue #170970.FlexSubThemes.dropdownMenuTheme property maximumSize temporarily default fallbacks to const WidgetStatePropertyAll<Size>(Size.infinite) if undefined. This results in the same default and correct style that Flutter had in 3.29.x and earlier versions. The default fallback will be removed in a future version of FlexColorScheme when the issue is fixed in Flutter SDK stable release.CHORE
Switch.activeColor to Switch.activeThumbColor in ColorNameValue.RadioGroup API in the Playground Theme Simulator in the Material-3 example app.FEATURE
ShowValueIndicator.onDrag and ShowValueIndicator.alwaysShow, which are new values in Flutter 3.35. The old value ShowValueIndicator.always is deprecated in Flutter 3.35 and will be removed in a future version of Flutter SDK and the Playground app.This is a pre-release of FlexColorScheme v8.2.1, released to support breaking changes in Flutter SDK v3.35.0-0.0.pre "beta" channel. It may not cover…
July 19, 2025
This is a pre-release of FlexColorScheme v8.2.1, released to support breaking changes in Flutter SDK v3.35.0-0.0.pre "beta" channel. It may not cover additional breaking changes in the latest Flutter "master" channel.
Requires at least Flutter SDK v3.35.0-0.0.pre.
CHORE
Fix the Flutter broken API for AppBarTheme, migrate to use new AppBarThemeData. For more information, see the discussion in #PR285
Update tests to use the new AppBarThemeData API.
Fix the Flutter broken API for InputDecorationTheme, migrate to use new InputDecorationThemeData. For more information, see the discussion in #PR285
Update tests to use the new InputDecorationThemeData API.
The test for FlexSubThemeData.sliderShowValueIndicator was changed from in Flutter 3.35 deprecated value ShowValueIndicator.always to ShowValueIndicator.onDrag, which is the new equivalent value in Flutter 3.35.
ShowValueIndicator.onDrag and ShowValueIndicator.alwaysShow, which are the new values in Flutter 3.35. The old value ShowValueIndicator.always is deprecated in Flutter 3.35 and will be removed in a future version of Flutter SDK and the Playground app.Version 8.2.1-dev.2 Pre-release
Pre-release
Compare
This is a pre-release of FlexColorScheme v8.2.1, released to support breaking changes in Flutter SDK v3.34.0-0.1.pre "beta" channel. It does not cover…
July 16, 2025
This is a pre-release of FlexColorScheme v8.2.1, released to support breaking
changes in Flutter SDK v3.34.0-0.1.pre "beta" channel. It does not cover
additional breaking changes in latest Flutter "master" channel.
Requires at least Flutter SDK v3.34.0-0.1.pre.
CHORE
BottomAppBarTheme on the beta/master channel,BottomAppBarThemeData API.Switch.activeColor to Switch.activeThumbColor in ColorNameValue.RadioGroup API in the Playground Theme Simulator in the Material-3 example app.Version 8.2.1-dev.1 Pre-release
Pre-release
Compare
Fix TabBarTheme normalization Flutter SDK breaking change on the master and beta channel, see issue #276.
March 23, 2025
CHORE
MaterialStateUnderlineInputBorder → WidgetStateInputBorderMaterialStateOutlineInputBorder → WidgetStateInputBorderThemedata.dialogBackgroundColor: Removed all usage and references in the FCS packages and Themes Playground app.ThemeData.indicatorColor: Removed all usage and references in the FCS packages and Themes Playground app. FlexColorScheme has not used this property for a while, but kept it defined while it still existed. It is deprecated in Flutter 3.31.0 BETA and will be so in next stable Flutter release as well. FCS 8.2.0 stops defining any value for it and also removes it from the Themes Playground app. It has in FCS for a long time already been replaced by TabBarThemeData.indicatorColor. Test were now also updated to use this reference instead of the to be deprecated one.FIX
TabBarTheme normalization Flutter SDK breaking change on the master and beta channel, see issue #276.
NEW
Added Shadcn UI color schemes. This includes, custom classes to store the Shadcn color tokens, FlexSchemeColor implementations of them and FlexScheme enums of the configs to make it easy to use them.
The FlexScheme enums for using the Shadcn colors are:
FlexScheme.shadBlueFlexScheme.shadGrayFlexScheme.shadGreenFlexScheme.shadNeutralFlexScheme.shadOrangeFlexScheme.shadRedFlexScheme.shadRoseFlexScheme.shadSlateFlexScheme.shadStoneFlexScheme.shadVioletFlexScheme.shadYellowFlexScheme.shadZincThe Shadcn color schemes are still considered beta. The current version does not yet support or use the Shadcn default colors for background, surface and container colors. In this release those colors are using FlexColorScheme's monochrome surface colors. Later versions may change this and use the Shadcn surface colors by default when selecting these themes, with an option to switch to FlexColorScheme's monochrome surface colors, which this version currently uses as the only choice.
The Shadcn color selections only set default colors, you will have to theme Material to look more like Shadcn yourself by selecting the correct Material components and modifying their properties to look and behave more like Shadcn style. The Themes Playground includes a pre-configured very preliminary configuration that you can use to do this.
The Shadcn color features are in this beta release excluded from FlexColorScheme's otherwise rigorous tests.
FIX
CHANGE
MaterialApp properties theme and themeDark, in favor of the newer one that generates the configs as its own file. The newer one has been the default option since version 8.0.0.NavigationRailLabelType.none.
none option as the collapsed style, when the rail is expanded. For more info about this peculiar limitation see issue #277.labelType to NavigationRailLabelType.none when extended is set to true, and back to null when it is false to use a themed value, that may then have another value than none when the rail is collapsed. This is a limitation in Flutter SDK, not in FlexColorScheme. The Playground app uses this workaround to avoid the issue when it displays the demo NavigationRail in the extended state.NEW
Fix TabBarTheme normalization Flutter SDK breaking change on the master and beta channel, see issue #276 .
March 23, 2025
Test release to check PUB status result for release.
CHORE
MaterialStateUnderlineInputBorder → WidgetStateInputBorderMaterialStateOutlineInputBorder → WidgetStateInputBorderThemedata.dialogBackgroundColor: Removed all usage and references in the FCS packages and Themes Playground app.ThemeData.indicatorColor: Removed all usage and references in the FCS packages and Themes Playground app. FlexColorScheme has not used this property for a while, but kept it defined while it still existed. It is deprecated in Flutter 3.31.0 BETA and will be so in next stable Flutter release as well. FCS 8.2.0 stops defining any value for it and also removes it from the Themes Playground app. It has in FCS for a long time already been replaced by TabBarThemeData.indicatorColor. Test were now also updated to use this reference instead of the to be deprecated one.FIX
TabBarTheme normalization Flutter SDK breaking change on the master and beta channel, see issue #276.
NEW
Added Shadcn UI color schemes. This includes, custom classes to store the Shadcn color tokens, FlexSchemeColor implementations of them and FlexScheme enums of the configs to make it easy to use them.
The FlexScheme enums for using the Shadcn colors are:
FlexScheme.shadBlueFlexScheme.shadGrayFlexScheme.shadGreenFlexScheme.shadNeutralFlexScheme.shadOrangeFlexScheme.shadRedFlexScheme.shadRoseFlexScheme.shadSlateFlexScheme.shadStoneFlexScheme.shadVioletFlexScheme.shadYellowFlexScheme.shadZincThe Shadcn color schemes are still considered beta. The current version does not yet support or use the Shadcn default colors for background, surface and container colors. In this release those colors are using FlexColorScheme's monochrome surface colors. Later versions may change this and use the Shadcn surface colors by default when selecting these themes, with an option to switch to FlexColorScheme's monochrome surface colors, which this version currently uses as the only choice.
The Shadcn color selections only set default colors, you will have to theme Material to look more like Shadcn yourself by selecting the correct Material components and modifying their properties to look and behave more like Shadcn style. The Themes Playground includes a pre-configured very preliminary configuration that you can use to do this.
The Shadcn color features are in this beta release excluded from FlexColorScheme's otherwise rigorous tests.
FIX
CHANGE
MaterialApp properties theme and themeDark, in favor of the newer one that generates the configs as its own file. The newer one has been the default option since version 8.0.0.NavigationRailLabelType.none.
none option as the collapsed style, when the rail is expanded. For more info about this peculiar limitation see issue #277.labelType to NavigationRailLabelType.none when extended is set to true, and back to null when it is false to use a themed value, that may then have another value than none when the rail is collapsed. This is a limitation in Flutter SDK, not in FlexColorScheme. The Playground app uses this workaround to avoid the issue when it displays the demo NavigationRail in the extended state.NEW
Version 8.2.0-dev.1 Pre-release
Pre-release
Compare
…nor does it address theming properties that were deprecated in Flutter 3.29.0. FlexColorScheme v8.1.1 and v8.1.0, sans the useful workaround released…
Feb 15, 2025
NOTE
This fix release only contains a critical Flutter BUG workaround solution for users of Flutter versions 3.27.0 to 3.27.4 and 3.29.0.
This release does not contain any support for new theming features released in Flutter 3.29.0, nor does it address theming properties that were deprecated in Flutter 3.29.0. FlexColorScheme v8.1.1 and v8.1.0, sans the useful workaround released here, are verified to work with Flutter v3.29 as is. A later FlexColorScheme release v8.2.0, will add new theming features and also remove the theming properties that were deprecated in Flutter 3.29.0. Removing them has no impact on FlexColorScheme produced Material-3 themes in Flutter 3.29. Removing and fixing all the deprecations will break things in Flutter 3.27 versions, since some of their replacements do not exist in Flutter 3.27. The issue workaround and fix added here is intended to also support the issue in Flutter 3.27 versions, not only in Flutter 3.29, thus we cannot address the 3.29 deprecations in this release.
FIX
iconColor on buttons ElevatedButton, FilledButton, OutlinedButton, TextButton and SegmentedButton no longer default to foregroundColor when iconColor is not defined. This is caused by a BREAKING REGRESSION BUG in Flutter SDK, see issue 162839. The issue in Flutter SDK has been fixed via PR 162880. However, this fix will never apply to Flutter versions 3.27.0 to at least 3.29.0. It may land as a cherry-picked hotfix in Flutter 3.29.1 or later minor release of Flutter 3.29. The FIX released here in this version of FlexColorScheme, adds a workaround to this issue. Without this workaround patch, the icon color on the above-mentioned buttons will not work correctly. The used workaround patch will also work correctly after Flutter PR 162880 lands in Flutter.Fixed all new analyzer lint warnings and removed usage of all deprecated Color properties.
Dec 29, 2024
Color properties.NEW
Slider: Added theming properties for the Slider thumb color.
FlexSubThemesData got the property sliderThumbSchemeColor.FlexSubThemes.sliderTheme got the property thumbSchemeColor.BottomSheet: Added theming properties for the BottomSheet clip behavior property.
FlexSubThemesData got the property bottomSheetClipBehavior.FlexSubThemes.bottomSheetTheme got the property clipBehavior.null causing the sheet to use Clip.none as the default via the component's built-in default value. Keeping it null, or setting it to Clip.none helps avoid this Flutter SDK issue: #270 where using a BackdropFilter does not work correctly is any other clip behavior value than Clip.none is used.BottomSheetThemeData where the clip behavior was set to Clip.antialias by default, causing the issue with BackdropFilter usage to emerge by default. Now you have to select another clip behavior explicitly to get the same result as before, and ne warned that Flutter SDK has issues when doing so.TabBar: Added theming properties for the TabBar indicator animation behavior, that are based on the new enum property TabIndicatorAnimation in Flutter 3.27.0.
FlexSubThemesData got the property tabBarIndicatorAnimation.FlexSubThemes.tabBarTheme got the property indicatorAnimation.Exposes the convenience Color sRGB extensions from package flex_seed_scheme, that can be used as none deprecated replacements for alpha, red, green, blue and value they are called alpha8bit, red8bit, green8bit, blue8bit and value32bit. FlexColorPicker uses them internally to avoid using the deprecated Color properties.
CHANGE
FlexSubThemesData(interactionEffects: true) is now negligible for the Slider's default thumb overlay color.FlexSubThemes.cardTheme and FlexSubThemes.dialogTheme to use normalized component themes and return CardThemeData and DialogThemeData instead of CardThemeand DialogTheme. This is in-line with changes in Flutter 3.27.0.FIX
errorContainer used tertiaryContainer, corrected to use errorContainer.NEW
CHANGE
Changelog for version 8.0.0 says and intended this:
Dec 1, 2024
FIX
Changelog for version 8.0.0 says and intended this:
"The
FlexSubThemesDatapropertyinputDecoratorIsFillednow default tofalsewhen undefined, like Flutter SDK does.
Set it totrueto get the same style it had with previous undefined value."
Due to a bug, this was not the case. This release fixes the bug and the property now defaults to false when undefined, as intended and documented in version 8.0.0 changelog. FIX: #265
Fixed the version constraint. The V8 package is only compatible with Flutter 3.24.0 and later. It was intended to be compatible with Flutter 3.22.0 an
Nov 13, 2024
FIX
NEW
CHANGE
Nothing published for this version
The most critical changes to migrate from FlexColorScheme V7 to V8 are listed below. For a full list of all breaking changes, see PACKAGE CHANGES and…
Nov 3, 2024
Version 8.0.0 makes FlexColorScheme fully aligned with Flutter's MAJOR BREAKING Material-3 theming changes introduced in Flutter version 3.22. Due to Flutter 3.22 breaking many past Material styles, introducing new colors to ColorScheme and deprecating three colors, FlexColorScheme had to undergo major revision and also break many of its past styles and some older APIs.
Most APIs are still there and work as before, but a few produce results that differ slightly from past ones, just like Flutter 3.22 also does over previous versions. Generally, the upgrade should be smooth, but you may need to review the produced theme result to see that you don't get any changes that don't fit with your design goals. Some past defaults have changed in FCS V8, but previous settings are still available. However, you will need to enable them explicitly to get the same results as before. The purpose of these default value changes is to make FCS have less opinionated defaults, and be more aligned with Flutter's Material-3 design defaults. The Themes Playground app will still have some of its own opinionated defaults, done via default settings values the app uses in its default configuration, but the package Material-3 default starting points are now much more aligned with Flutter's Material-3 defaults.
In the Themes Playground you can now export and import settings to a JSON file, and import them back into the Playground later. This is a great way to save your theme settings for later re-use. The exported JSON contains all the internal controller settings values you have configured in the Playground app, that are needed to restore a given configuration state. This Playground feature was a nice contribution by GitHub user @akiller in !PR 257, thank you! This contributed feature got enhanced with more error handling and a slightly refined UI to make it production ready. As a further enhancement of the JSON export feature, the Themes Playground app also got the ability to convert the exported settings JSON config to a shareable URL. You can now share Playground settings with other Flutter developers.
The most critical changes to migrate from FlexColorScheme V7 to V8 are listed below. For a full list of all breaking changes, see PACKAGE CHANGES and the BREAKING part further below.
The flag useMaterial3 now defaults to true in FlexColorScheme and FlexThemeData constructors. Set it to false to explicitly use Material-2 theming. It defaulted to true before. Material-2 is still fully supported in FCS v8 and Flutter v3.24, but will eventually be deprecated in Flutter, when that happens, it will also happen in FCS.
With the Themes Playground app, you can use a pre-configured Material-3 based theme that looks very similar to legacy Material-2 design. This will continue to be available also after Material-2 is deprecated in Flutter.
The FlexSubThemesData properties interactionEffects, tintedDisabledControls, defaultUseM2StyleDividerInM3 and blendOnColors now all default to false. In previous versions they defaulted to true. If you before had not explicitly turned these properties false, they were all true by default. To get the same result as before in FCS V8, you now have to set these properties to true. This change was made to have fewer opinionated defaults in FCS to align it more with Flutter SDK default styles.
The FlexSubThemesData property navigationRailLabelType no default to NavigationRailLabelType.none. To get the same result as before by default, you will need to set it to NavigationRailLabelType.all. This change was made to have fewer opinionated defaults in FCS to align it more with Flutter SDK default styles. The Playground defaults it to NavigationRailLabelType.all by adding this by default to new default themes.
Since ColorScheme.background color was deprecated in Flutter 3.22.0 we can no longer use it as a part of surface blends and its modes. For example, when surfaceMode is set to FlexSurfaceMode.highBackgroundLowScaffold it now uses surface and dialog blends set to 2x instead of 1x, so that it represents the "high background" style as before, but done via surface color. Without this breaking change, this mode would produce the same result as FlexSurfaceMode.levelSurfacesLowScaffold and be redundant.
ColorScheme colors background, onBackground and surfaceVariant.This major release has many breaking changes forced via breaking changes in Flutter 3.22.0. Due to this, the release also uses this opportunity to clean up APIs with opinionated defaults, like the ones mentioned above. There are additional smaller and more subtle changes in defaults values, that align FCS to use the same color defaults from the new ColorScheme colors, that Flutter started using in version 3.22.0 as well. You can find all the details below in the PACKAGE CHANGES chapter.
Flutter 3.22 introduced a large number of breaking changes to the ColorScheme and default color mappings that Flutter's Material components use. In total, the Flutter 3.22.0 release adjusted 249 of its own internal tests to accommodate for new Material-3 spec changes, that all broke past Flutter Material-3 component styles. For a reference to the broken and updated tests, see this issue side comment.
FlexColorScheme V8 now allows you to use the new colors introduced in Flutter 3.22. As before, with FCS you can get fully defined hand-tuned ColorSchemes without using Material-3 design's Material Color Utilities (MCU) based seed-generated ColorSchemes. You may prefer to use seed generated ColorSchemes with Material-3, but it is nice to know you do not have to.
To the seed generated ColorSchemes, FCS adds support for all the Flutter DynamicSchemeVariant seed generated variants. It also improves them by allowing you to use separate seed colors for each palette. With Flutter's ColorScheme.fromSeed, you can only seed with one color, the primary color. The resulting ColorScheme always uses computed values for secondary and tertiary palettes, plus a hard coded fixed color for the error palette seeding. Surfaces colors are always tied to primary color as well and include a hint of primary color. With FCS, you do not have these limitations, you can seed with separate colors for each palette with even with Flutter's own dynamic scheme variants. This was always possible with FlexColorScheme and its FlexSeedScheme (FSS) based FlexTones, seed generated scheme variants. FCS now brings this feature to Flutter's own dynamic scheme variants as well.
As before, FCS also has its own even configurable FlexTones way of making seed generated ColorSchemes. Typically, you use predefined FlexTones, but you can also create your own FlexTones configurations. With it, you can define the chroma goals for each palette and define which tone is mapped to what ColorScheme color. An internal example of using them is the implementation of FlexTones modifiers.
FlexColorScheme V8 adds three new FlexTones modifiers. The most useful one is called monochromeSurfaces(). This tone modifier makes the surface shades of any used FlexTones configuration use monochrome greyscale shades for the surface and surface variant palettes. It thus gives us greyscale colors for ALL surfaces, instead of primary-tinted ones. It can be applied to any FlexTones seed generated scheme variant. The other new modifiers are expressiveOnContainer() and higherContrastFixed(). Check the API docs for more details.
This section contains a detailed list of all changes introduced in FlexColorScheme version 8.0.0.
BREAKING CHANGES
This version contains a lot of breaking changes due to updates in the Material-3 ColorScheme in Flutter 3.22. At the same time, this release uses the forced breaking change to clean up some older APIs. FCS is now more aligned with Flutter's Material-3 theming defaults, by typically using them as starting points in the default Material-3 mode. Material-2 mode is still supported, it has its own opinionated defaults as before.
The ThemeData flag useMaterial3 is now true by default to align with Flutter 3.16.0 and later default for ThemeData. To continue using Material-2 theming, set useMaterial3 to false. All component themes in FlexSubThemes that have a useMaterial3 property now also default to true.
Keeping to Material-3 defaults, in the theme factories light and dark, if scheme is undefined it now defaults to FlexScheme.materialBaseline the Material-3 baseline scheme, when useMaterial3 is true. If useMaterial3 is false and schemeis undefined, it defaults to FlexScheme.material, the default Material-2 theme, as before.
Removed ALL references to in Flutter 3.22 deprecated ColorScheme colors background, onBackground and surfaceVariant. They are not used in FCS anymore. The background color was critical for FCS surface blending, it is now handled differently. The removal of these ColorScheme colors had far-reaching, but typically still subtle implications on styles created by FCS. There are many breaking minor style changes in this release due to this. Here are the critical changes caused by all these breaking changes in Flutter 3.22:
background and onBackground colors in FlexColorScheme, FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light and FlexThemeData.dark factories. They are not used anymore. Use surface and onSurface colors instead.background, onBackground, surfaceVariant from FlexSchemeOnColors and FlexSchemeSurfaceColors. They are no longer used and have no function. They were deprecated since the same colors were deprecated in ColorScheme in Flutter 3.22.surfaceVariantAlpha and backgroundAlpha colors in FlexAlphaValues. They are not used anymore and have no function, use surfaceAlpha instead. They were deprecated since the colors they related to were deprecated in ColorScheme in Flutter 3.22.FlexSchemeSurfaceColors.blend factory constructor produces slightly different blend result than in earlier versions. Because Flutter 3.22 deprecated ColorScheme colors background, onBackground and surfaceVariant, that were used in the blend calculation earlier. It is no longer possible to produce the same results as before, but the results are equivalent to previous design intent. With one exception, using surfaceMode with FlexSurfaceMode.highBackgroundLowScaffold sets surface and dialog blends to 2x instead of 1x, so that it represents the "high background" style as before, but done via surface. Without this breaking change, this mode would produce the same result FlexSurfaceMode.levelSurfacesLowScaffold and be redundant.SchemeColor removed all the corresponding colors that Flutter 3.22 deprecated. This is a VERY breaking change and will break your code if you happened to use any of the removed enum values. This may likely happen. The removed enum values are: SchemeColor.background, SchemeColor.onBackground and SchemeColor.surfaceVariant. For background Flutter recommends that you should use the values SchemeColor.surface and SchemeColor.onSurface instead and for surfaceVariant the SchemeColor.surfaceContainerHighest is recommended. In all cases you can try the other new surface colors as well, to see what best fits your design goals and intent.SchemeColor got support for all the new colors in Flutter 3.22 ColorScheme. It also removed the colors Flutter 3.22 deprecated. The order of the enum values was modified. This will break usage that depends on the enum's index, for example, storage of the values for implementations that depend on the index value.systemNavBarStyle in FlexColorScheme.themedSystemNavigationBar now defaults to FlexSystemNavBarStyle.surface, instead of FlexSystemNavBarStyle.background. Using FlexSystemNavBarStyle.background results in the color Theme.of(context).colorScheme.surfaceContainerLow being used, where it previously was Theme.of(context).colorScheme.background. This is because Flutter 3.22 deprecated ColorSCheme.background.FlexAppBarStyle value background now results in the AppBar using the surfaceContainerLow color instead of background. This breaking change was introduced because of the breaking change in Material-3 in Flutter 3.22 where the color background was deprecated. The new color is kind of the best match for the old background color in a typical FCS configuration.FlexSystemNavBarStyle value background now results in the app bar using the surfaceContainerLow color instead of background. This breaking change was introduced because of the breaking change in Material-3 in Flutter 3.22 where the color background was deprecated. The new color is kind of the best match for the old background color in typical FCS configuration.Breaking rename: All helper component themes in FlexSubThemes ended with Theme, as designed, except FlexSubThemes.bottomNavigationBar. This mistake is now corrected, it was renamed to FlexSubThemes.bottomNavigationBarTheme. The old version is deprecated and passes its props through to the renamed version. The old and wrong named one will be removed in version 9.0.0.
Deprecated FlexSubThemesData.blendTextTheme, it no longer has any function. See topic "Why is blendTextTheme deprecated?" further below for more information,
Deprecated the FCS legacy property useFlutterDefaults. FlexColorScheme in Material-3 mode now defaults to using Flutter default styles. For other configurations, modify them as desired. In Material-2 mode, FCS continues to use its opinionated own defaults as before, as long as Material-2 exists.
Deprecated the static function FlexColorScheme.createPrimarySwatch, it is no longer used by FlexColorScheme internally, it is now deprecated in FlexColorScheme and will go away in V9. After this, you will still be able to find this function in ColorTools in the package flex_Color_picker, where it will remain available.
Replaced the FCS legacy property useTextTheme with a more feature correctly named property useMaterial3Typography. Use it instead. The useTextTheme originally had another function in much older versions of FCS. Its name no longer represented its function, the new name does. If not defined, the default is true in Material-3 mode and false in Material-2 mode. If you still use Material-2, try setting this to true to get nicer typography in Material-2 mode.
The color material3DarkOnErrorContainer was changed from Color(0xFFFFB4AB) to Color(0xFFFFDAD6) to match the new Material-3 default dark error color used in Flutter 3.22.
Dialog background color now defaults to surfaceContainerHigh with no elevation tint color in Material-3 mode, instead of surface with elevation tint. Breaking change introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The ElevatedButton background color now defaults to surfaceContainerLow with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The PopupMenuButton background color now defaults to surfaceContainer with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The MenuBar background color now defaults to surfaceContainer instead of surface with elevation tint in Material-3 mode. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The produced MenuTheme background color now defaults to surfaceContainer with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22. This affects default background color of the opened menu on MenuBar, MenuAnchor and DropdownMenu.
The BottomSheet background color now defaults to surfaceContainerLow with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The produced DrawerTheme background color now defaults to surfaceContainerLow with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22. This affects the default background color of the Drawer and NavigationDrawer. FCS uses surfaceContainerLow as background color in Material-2 mode by default too.
The produced DrawerTheme width now defaults to 304 dp in Material-3 mode. The [official Material-3 spec is 360 dp](Material-3 spec https://m3.material.io/components/navigation-drawer/specs), FCS was using it, but Flutter SDK has so far "declined" following the Material-3 spec here and still uses the older default 304 dp used in the Material-2 spec. This older default is actually a better choice, so FCS has now opted to revert to using it as default too. For more information about this and why 304 dp is better, see Flutter issue #123380.
The FlexSubThemesData properties interactionEffects, tintedDisabledControls and defaultUseM2StyleDividerInM3 now all default to false. In previous versions they defaulted to true. This change was made to have fewer opinionated defaults in FCS to align it more with Flutter SDK default styles. If you had NOT configured these values before, they defaulted to true. You now have to set them explicitly to true to opt in and get the same results as you got before when they were not configured.
The FlexSubThemesData properties blendOnColors now defaults to false. In previous versions it defaulted to true. This change was made to have fewer opinionated defaults in FCS, to align it more with Flutter defaults. If you had NOT configured this values before, it defaulted to true. You now have to set it explicitly to true to get the same result as before, when it was not configured. Consider setting this property true in dark mode, and false in light theme mode, for a style that matches the Material-3 color design, when you are not using a seed generated ColorScheme. This setting has no effect when using a seed generated ColorScheme, as it generates blended/tinted onColors based on the seed algorithm, that overrides the effect of this setting. This setting creates a similar effect for none seeded ColorSchemes.
The FlexSubThemesData property inputSelectionHandleSchemeColor when not defined, defaults to inputDecoratorSchemeColor and if it is not defined either, the effective text selection handle color result is ColorScheme.primary, same as Flutter SDK default. In previous versions, no definitions, resulted in ThemeData.primaryColorDark being used. This was changed in preparation of Flutter's planned deprecation of primaryColorDark.
The FlexSubThemesData property inputDecoratorIsFilled now default to false when undefined, like Flutter SDK does. Set it to true to get the same style it had with previous undefined value.
The FlexSubThemesData property inputDecoratorBorderType now default to FlexInputBorderType.underline when undefined, producing same default as Flutter SDK does. Set it to FlexInputBorderType.outline to get the same style it had with previous undefined value.
The FlexSubThemesData property inputDecoratorUnfocusedBorderIsColored now default to false when undefined, like Flutter SDK does. Set it to true to get the same style it had with previous undefined value.
In FlexSubTheme.InputDecorationTheme the following properties have new breaking default values: filled default to false, borderType default to FlexInputBorderType.underline and unfocusedBorderIsColored to false.
The FlexSubThemesData properties navigationRailMutedUnselectedLabel and navigationRailMutedUnselectedIcon now default to false. In previous versions they defaulted to true. This change was made to have fewer opinionated defaults in FCS and follow Material-3 design spec by default.
The FlexSubThemesData properties navigationRailUseIndicator now defaults to null, resulting in true being used in Material-3 mode and false in Material-2 mode. In previous versions it defaulted to true. This change was made to have fewer opinionated defaults in FCS and follow Material design specs for default values. If you still use Material-2, you now have to set this to true to see the indicator. The Playground now always sets either true or false in both modes, it never leaves out the default choice in generated config code. The field is nullable, and you can now also get the M2/M3 different default styles, by not defining this property at all.
In FlexSubThemes.navigationRailTheme the properties mutedUnselectedLabel and mutedUnselectedIcon now default to false if undefined. In previous versions they defaulted to true. Property selectedLabelSchemeColor defaults to onSurface and unselectedLabelSchemeColor default to onSurfaceVariant, they were primary before. Property unselectedIconColor now defaults to onSurfaceVariant it was onSurface. Property selectedIconColor now defaults to onSecondaryContainer it was primary. Property labelType now defaults to NavigationRailLabelType.none it was NavigationRailLabelType.all.
The FlexSubThemesData properties navigationRailUnselectedLabelSchemeColor and navigationRailUnselectedIconSchemeColor now default to onSurfaceVariant (was onSurface). The onSurfaceVariant is used as on color pair default when any surface color is used as background color for the rail, if a none surface color is used as background scheme color, its contrast color pair is used as default for the labels and unselected icons. The navigationRailSelectedIconSchemeColor will if undefined, default to the contrast color pair for navigationRailIndicatorSchemeColor. These default behaviors result in less configuration in typical designs, while starting points defaults are the same as before and full configuration options are also available as before. The equivalent colors in FlexSubThemes.navigationRailTheme behave the same way.
The FlexSubThemesData properties navigationBarMutedUnselectedLabel and navigationBarMutedUnselectedIcon now default to false. In previous versions they defaulted to true. This change was made to have fewer opinionated defaults in FCS and follow Material-3 design spec by default.
In FlexSubThemes.navigationBarTheme the properties mutedUnselectedLabel and mutedUnselectedIcon now default to false if undefined. In previous versions they defaulted to true. Property selectedLabelSchemeColor defaults to onSurface and unselectedLabelSchemeColor default to onSurfaceVariant, they were primary before. Property unselectedIconColor now defaults to onSurfaceVariant it was onSurface. Property selectedIconColor now defaults to onSecondaryContainer it was primary.
The FlexSubThemesData properties navigationBarUnselectedLabelSchemeColor and navigationBarUnselectedIconSchemeColor now default to onSurfaceVariant (was onSurface). The onSurfaceVariant is used as on color pair default when any surface color is used as background color for the rail, if a none surface color is used as background scheme color, its contrast color pair is used as default for the labels and unselected icons. The navigationBarSelectedIconSchemeColor will if undefined, default to the contrast color pair for navigationBarIndicatorSchemeColor. These default behaviors result in less configuration in typical designs, while starting points defaults are the same as before and full configuration options are also available as before. The equivalent colors in FlexSubThemes.navigationBarTheme behave the same way.
The FlexSubThemesData properties bottomNavigationBarMutedUnselectedLabel and bottomNavigationBarMutedUnselectedIcon now default to null, resulting in true being used as default in Material-2 mode and false in Material-3 mode. In previous versions these properties defaulted to true in both modes. This change was made to have fewer opinionated defaults in FCS.
The FlexSubThemesData properties bottomNavigationBarUnselectedLabelSchemeColor and bottomNavigationBarUnselectedIconSchemeColor now default to onSurfaceVariant in Material-3 mode, it was onSurface, which remains the default in Material-3 mode. In Material-3 mode, the onSurfaceVariant is used as on color pair default when any surface color is used as background color for the navigation bar. If a none surface color is used as background scheme color, its contrast color pair is used as default for the labels and unselected icons, in both Material-2 and Material-3 mode. These default behaviors result in less configuration in typical designs, while starting points defaults are the same as before and full configuration options are also available as before. The equivalent colors in FlexSubThemes.bottomNavigationBar behave the same way.
The FlexSubThemesData property chipDeleteIconSchemeColor now default to SchemeColor.onSurfaceVariant. In previous versions it defaulted to SchemeColor.onSurface. Likewise in FlexSubThemes.chipTheme the property deleteIconSchemeColor now defaults to SchemeColor.onSurfaceVariant if undefined. In previous versions it defaulted to SchemeColor.onSurface. This change was made to adjust to follow updated Material-3 spec defaults.
The FlexSubThemesData property drawerUnselectedItemSchemeColor now default to SchemeColor.onSurfaceVariant, as on color pair default when any surface color is used as drawer background color. Previously it defaulted to onSurface. Likewise in FlexSubThemes.navigationDrawerTheme the property unselectedItemSchemeColor now defaults to SchemeColor.onSurfaceVariant if undefined. This was changed to use ase as Material-3 defaults.
Minor style breaking, the tinted interactions were slightly modified. They are now a bit less pronounced and also have a bit less gray in them.
NEW
Added three new FlexSchemes, called blackWhite, greys and sepia. They are primarily intended to be used as prototype phase color schemes that do not use colors. This can be useful for focusing on features and layout during the early development phase, keeping the discussion away from colors. The schemes can also be used as neutral baselines for custom color schemes, where only a few colors are overridden with custom colors.
The const color definition class FlexColor got 24 new color values to support monochrome greyscale colors for all new surfaces and their on colors for light and dark mode. These are used as starting colors for the new surface colors in the Flutter 3.22 updated and new Material-3 ColorScheme, when a seed generated ColorScheme is NOT used. These colors follow the naming convention lightFlexSurface___ and darkFlexSurface___, plus their on and inverse versions.
Added named bool parameter useOnSurfaceVariant that defaults to false, to FlexSubTheme.schemeColorPair() and to FlexSubTheme.onSchemeColor(), when set to true, the on color onSurfaceVariant is returned instead for onSurface for all surface colors.
Added black, white and transparent as enum values to SchemeColor. These are not ColorScheme colors, but these colors can in many theming situations be useful instead of the ColorScheme based ones.
onSurface.Added all the new surface colors in Flutter 3.22 to FlexSchemeSurfaceColors.
Added all the new on colors in Flutter 3.22 to FlexSchemeOnColors.
The FlexKeyColor class got three new properties, contrastLevel, useExpressiveOnContainerColors and useLegacyMonochromeSeedBehavior. They are used to control seed generation results.
The contrastLevel is used to control the contrast level of MCU generated scheme colors. The contrastLevel parameter indicates the contrast level between color pairs, such as primary and onPrimary. The value 0.0 is the default, standard contrast; -1.0 is the lowest; 1.0 is the highest. From the Material-3 Design guideline, the standard, medium and high contrast options correspond to values 0.0, 0.5 and 1.0 respectively.
contrastLevel property is only available when seed generating a ColorScheme using FlexSeedScheme's SeedColorScheme.fromSeeds when a scheme variant is used where its FlexSchemeVariant.value, isFlutterScheme is true. This set corresponds to all the DynamicSchemeVariants available in the Flutter SDK.contrastLevel is the same as the Flutter contrastLevel property available in ColorScheme.fromSeed. As of Sep 3, 2024, this contrastLevel is still only available in the master channel. It will land in the next Flutter stable, released after Flutter 3.24. With FCS v8 you can use it already now.
When using FSS
tonesbased seed generated schemes or avarianthaving itsFlexSchemeVariant.value,isFlutterSchemeit set tofalse, thecontrastLevelvalue is ignored. Withtonesbased schemes, the contrast level can instead be defined as desired using customFlexTonesconfigurations. There are two predefined higher contrast level tone and chroma mappings available asFlexTones.highContrastandFlexTones.ultraContrast, you can use them as they are, or as examples of how to create your own custom high contrast tone mappings.
The boolean useExpressiveOnContainerColors is used to make the light theme mode colors onPrimaryContainer, onSecondaryContainer, onTertiaryContainer and onErrorContainer more color expressive, at the cost of their contrast level and accessibility. Defaults to false if undefined.
onPrimaryContainer, onSecondaryContainer, onTertiaryContainer and onErrorContainer have changed from tone 10 to 30 for LIGHT theme mode. This change will land in Flutter when the Material Color Utilities (MCU) package is updated to at least 0.12.0. This has not been done even in master (Sep 3, 2024).useExpressiveOnContainerColors to true will make the colors use the new expressive tone. The expressive tone spec is not yet used in Flutter SDK, but is in the Material-3 design spec and also in MCU v 0.12.0. When this change lands in stable Flutter, it will be made ON by default in FCS too. You will still be able to opt out of using it. Flutter SDK and MCU will not contain such an opt-out feature.useExpressiveOnContainerColors to false. With it set to false, you will also keep this preference when the Flutter SDK defaults to using the expressive tones.The boolean useLegacyMonochromeSeedBehavior is used for enabling the legacy behavior for monochrome seed colors
useLegacyMonochromeSeedBehavior to true.false.respectMonochromeSeed in SeedColorScheme.fromSeeds in FlexSeedScheme's internal MCU fork, and sets it !useLegacyMonochromeSeedBehavior. In FSS this feature is opt-in and recommended to be used. Here, in FCS this setting is opt-out if not desired, and it is strongly recommended to use the new behavior. When using useLegacyMonochromeSeedBehavior with
When using
useLegacyMonochromeSeedBehaviorwithDynamicSchemeVariantvariantsfidelityorcontent, for some monochrome input colors they produceprimaryContainerandonPrimaryContaineras well astertiaryContainerandonTertiaryContainercolor pairs, with low contrast. Consider using some other scheme variants with monochrome seed colors. All others work well with any monochrome seed color. This is just how the MCUDynamicSchemesSchemeContentandSchemeFidelityare defined in MCU. They also produce fairly low contrast for these color pairs with very dark seed colors. This behavior with MCU'sSchemeContentandSchemeFidelitycould be fixed in FlexSeedScheme's internal MCU fork, but we want to keep the result of these schemes consistent with MCU.
Added TextStyles for FlexSubThemesData so that:
FlexSubThemes.appBarTheme uses FlexSubThemesData.appBarToolbarTextStyle for its toolbarTextStyle.FlexSubThemes.appBarTheme uses FlexSubThemesData.appBarTitleTextStyle for its titleTextStyle.FlexSubThemes.chipTheme uses FlexSubThemesData.chipLabelStyle for its labelStyle.FlexSubThemes.chipTheme uses FlexSubThemesData.chipSecondaryLabelStyle for its secondaryLabelStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerHeaderHeadlineStyle for its headerHeadlineStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerHeaderHelpStyle for its headerHelpStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerWeekdayStyle for its weekdayStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerDayStyle for its dayStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerYearStyle for its yearStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerRangePickerHeaderHeadlineStyle for its rangePickerHeaderHeadlineStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerRangePickerHeaderHelpStyle for its rangePickerHeaderHelpStyle.FlexSubThemes.dialogTheme uses FlexSubThemesData.dialogTitleTextStyle for its titleTextStyle.FlexSubThemes.dialogTheme uses FlexSubThemesData.dialogContentTextStyle for its contentTextStyle.FlexSubThemes.floatingActionButtonTheme uses FlexSubThemesData.fabExtendedTextStyle for its extendedTextStyle.FlexSubThemes.menuButtonTheme uses FlexSubThemesData.menuButtonTextStyle for its textStyle.FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerDayPeriodTextStyle for its dayPeriodTextStyle.FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerDialTextStyle for its dialTextStyle.,FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerHelpTextStyle for its helpTextStyle.,FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerHourMinuteTextStyle for its hourMinuteTextStyle.,FlexSubThemes.toggleButtonsTheme uses FlexSubThemesData.toggleButtonsTextStyle for its textStyle.FlexSubThemes.segmentedButtonTheme uses FlexSubThemesData.segmentedButtonTextStyle for its textStyle.FlexSubThemes.snackBarTheme uses FlexSubThemesData.snackBarContentTextStyle for its contentTextStyle.copyWith on the produced component themes. With these props you get access to direct TextStyle styling for these component properties in the FCS API too.Added useCupertinoStyle property to FlexSubThemes.switchTheme. Added switchAdaptiveCupertinoLike property to FlexSubThemesData and made FlexSubThemes.switchTheme use it.
Added secondarySelectedSchemeColor, fontSize, secondaryFontSize, iconSize and padding properties to FlexSubThemes.chipTheme. Added chipSecondarySelectedSchemeColor, chipFontSize, chipSecondaryFontSize, chipIconSize and chipPadding properties to FlexSubThemesData and made FlexSubThemes.chipTheme use them.
Added headerForegroundSchemeColor property to FlexSubThemes.datePickerTheme. Added datePickerHeaderForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.datePickerTheme use it for its header foreground color.
Added dividerSchemeColor property to FlexSubThemes.datePickerTheme. Added datePickerDividerSchemeColor property to FlexSubThemesData and made FlexSubThemes.datePickerTheme use it for its divider color.
Added isDense property to FlexSubThemes.inputDecoratorTheme. Added inputDecoratorIsDense property to FlexSubThemesData.
Added contentPadding property to FlexSubThemes.inputDecoratorTheme. Added inputDecoratorContentPadding property to FlexSubThemesData and made FlexSubThemes.inputDecoratorTheme use it.
Added inputDecoratorSuffixIconSchemeColor property to FlexSubThemes.inputDecorationTheme. Added toggleButtonsSelectedForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.segmentedButtonTheme use it.
Added adaptiveInputDecoratorRadius and inputDecoratorRadiusAdaptive properties to FlexSubThemesData. They are used to select platform(s) to an alternative border radius response for the input decorator, for the selected platform(s).
Added minWidth and minExtendedWidth to FlexSubThemes.navigationRailTheme. Added navigationRailMinWidth and navigationRailMinExtendedWidth properties to FlexSubThemesData and made FlexSubThemes.navigationRailTheme use them.
Added tabAlignment property to FlexSubThemes.tabAlignment. Added tabBarTabAlignment property to FlexSubThemesData and made FlexSubThemes.tabBarTheme use it for its. (TODO: Add a note about thrown assert, open an issue in Flutter SDK about it and suggest an alternative solution.)
Added foregroundSchemeColor property to FlexSubThemes.floatingActionButtonTheme. Added fabForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.floatingActionButtonTheme use it for its foreground color.
Added selectedForegroundSchemeColor property to FlexSubThemes.segmentedButtonTheme.
Added segmentedButtonSelectedForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.segmentedButtonTheme use it.
Added selectedForegroundSchemeColor property to FlexSubThemes.toggleButtonsTheme.
Added toggleButtonsSelectedForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.toggleButtonsTheme use it.
Added appBarForegroundSchemeColor, appBarIconSchemeColor and appBarActionsIconSchemeColor properties to FlexSubThemesData and made FlexSubThemes.appBarTheme use it for its colors on title, icon and actions.
Added bottomAppBarHeight property to FlexSubThemesData and made FlexSubThemes.bottomAppBarTheme use it as its height value.
Added scaffoldBackgroundBaseColor property to FlexSubThemesData. It is a FlexScaffoldBaseColor enum that can be used to select the base color used as Themedata.scaffoldBackgroundColor in a theme. The selected base color is modified by used surfaceMode and blendLevel] in the FlexColorScheme's light and dark factory constructors.
Added scaffoldBackgroundSchemeColor property to FlexSubThemesData and made ThemeData.scaffoldBackgroundColor use it as an override color, if it is defined. Setting scaffoldBackgroundSchemeColor will override any blended background or true black or plain white setting.
Added cupertinoOverrideTheme to FlexColorScheme constructor and to FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light and FlexThemeData.dark factory constructors.
Added enum variant a FlexSchemeVariant to FlexColorsScheme and FlexThemeData light and dark. This is used to define the variant of the seeded ColorScheme. It is an alternative to tones that also includes scheme seed variants that Flutter SDK added in version 3.22.2.
Added enhanced enum functions data and colors to the FlexScheme enum, that returns the predefined FlexSchemeData and FlexSchemeColor respectively, that are associated with a given enum value. This could be done already using the FlexColor.schemes map. This is a convenience API to be able to use e.g. FlexColor.mango.data to get the predefined FlexSchemeData for the mango enum scheme and e.g. FlexColor.barossa.colors(Brightness.dark) to get the pre-defined dark colors used for the barossa scheme colors. See feature request: https://github.com/rydmike/flex_color_scheme/issues/210
Added ability to use custom seed key colors to FlexKeyColors.
Added support for error colors to FlexKeyColors.
Added direct color properties for errorContainer and onErrorContainer to FlexColorScheme, FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light, FlexThemeData.dark. It was required to support custom error container colors in the FlexKeyColors API.
Added Color properties primaryLightRef, secondaryLightRef and tertiaryLightRef to FlexSchemeColor.
FlexSchemeColor made for light mode in the dark mode FlexSchemeColor. This is used to create computed "fixed" and "fixedDim" colors for dark mode and the light mode ColorScheme that are identical in light and dark mode.FlexSchemeColor(), FlexSchemeColor.from(), FlexSchemeColor.effective() and FlexSchemeColor.toDark() work correctly with the new primaryLightRef, secondaryLightRef and tertiaryLightRef properties.light color properties in FlexSchemeData static FlexSchemeColor color definitions, as lightRef colors in their dark mode equivalent FlexSchemeColor. That was 156 color values to add to the 52 dark FlexSchemeColor definitions.Added fixedColorStyle to FlexColorScheme, FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light, FlexThemeData.dark. It was required to support custom error container colors in the FlexKeyColors API. The property is an enum FlexFixedColorStyle, that allows us to choose the style of the generated "fixed" and "fixedDim" colors when not using seed generated color schemes.
Added Color properties primaryLightRef, secondaryLightRef and tertiaryLightRef to FlexColorScheme.dark and FlexThemeData.dark. If you use the override colors primary, secondary or tertiary and are not using seeded ColorScheme, you need them to provide the correct light mode reference colors for computing fixed colors that will match the light mode fixed colors, for that it is required to know what the light mode colors are. If you are seeding and use the overrides, and will switch between seeded and not seeded, you can provide the override for the not seeded values in primary, secondary or tertiary, and the ref to their seed colors from light mode, in the light ref colors. If you always seed when using the overrides, you can also provide the seed colors in the primary, secondary or tertiary overrides, the light refs fall through to these colors in that cases if not provided during seeding.
Added style navigationBar to enum FlexSystemNavBarStyle that use the color for default or themed NavigationBar background color on the system navigation bar helper.
navigationBar option does not require using the edge-to-edge config required when using transparent system navigation bar to see things behind it. The transparent option sets edge-to-edge mode behind the scenes when used. This can cause some layout changes that must be considered in the app design when used. This is an optional way to style the system navigation bar to match the app's themed NavigationBar background color, without using edge-to-edge Android screen mode.Added ListTile theming support to FlexSubThemesData and made corresponding FlexSubThemes.listTileTheme properties use them in FlexColorScheme as ListTileTheme theming properties.
FlexSubThemesData properties were added: listTileSelectedSchemeColor, listTileIconSchemeColor, listTileTextSchemeColor, listTileTitleTextStyle, listTileSubtitleTextStyle, listTileLeadingAndTrailingTextStyle, listTileTileSchemeColor, listTileSelectedTileSchemeColor, listTileContentPadding, listTileHorizontalTitleGap, listTileMinVerticalPadding, listTileStyle, listTileTitleAlignment and listTileControlAffinity.Added SearchBar and SearchView theming support to FlexSubThemesData and made corresponding FlexSubThemes.searchBarTheme and FlexSubThemes.searchViewTheme properties use them in FlexColorScheme as SearchBarThemeData and SearchViewThemeData theming properties.
FlexSubThemesData properties were added: searchBarBackgroundSchemeColor, searchViewBackgroundSchemeColor, searchBarElevation, searchViewElevation, searchBarRadius, searchViewRadius, searchViewHeaderHeight, searchBarTextStyle, searchViewHeaderTextStyle, searchBarHintStyle, searchViewHeaderHintStyle, searchViewDividerColor, searchBarShadowColor, searchBarTextCapitalization, searchBarPadding, searchBarConstraints, searchViewConstraints and searchUseGlobalShape.CHANGE
Changed all internal usage of MaterialStateProperty and MaterialState to use new WidgetStateProperty and WidgetState introduced in Flutter 3.22 and later.
Static functions FlexSubThemes.schemeColor and FlexSubThemes.onSchemeColor now support the updated SchemeColor and ColorScheme.
Improved the theming logic for Card theme.
Card.outlined variant for the default case at least. This Flutter theming limitation and impact is thus now the same in FCS, as it is with vanilla Flutter ThemeData and its CardTheme. It is still broken as mentioned in the above issue, but that is a Flutter theming issue and limitation that FCS cannot fix.Changed the FlexSubThemes.inputDecoratorTheme to use only border and its WidgetState for its theme. It offers more and nicer control over hover state than using the older legacy more limited border styles.
FIX
Fixed #198 AppBar color issue when using seed generated scheme with key color locked.
Fixed that the Rectangular Slider value indicator did not default to primary color when undefined, as intended in FCS M2 and M3 mode. Only the Drop style indicator defaulted to primary. This came from the framework defaulting the old M2 rectangular indicator to a complex, opacity and alpha blended onSurface grey looking result.
The blendTextTheme feature was originally made before Material-3's TextTheme was available, before it was fully known how it was going to be implemented. It was an approximation of the TextStyles that could be seen in early versions of Material-3 images. Since the actual Material-3 TextTheme is available, the tinted TextTheme feature is no longer required. While the FCS tinted TextTheme did provide an alternative version of the actual tint used in Material-3, the differences were quite subtle. Additionally, recent changes in Flutter make using it very verbose and complicated. Why it does so is explained in detail below.
In Material-3 Typography 2021, the TextTheme and all styles in it are fully opaque and use onSurface as color on all TextStyles. In a seed generated ColorScheme, the text styles become primary color tinted, because the onSurface color by default has subtle primary tint. With FCS, you can modify the onSurface to black or white to avoid this, if so preferred.
In Material-2 Typography 2018 and 2014, some TextStyles in their TextThemes use partially transparent white or black colors, making them appear tinted when placed on lightly colored backgrounds. Such TextStyles also have lower contrast. If the Material-3 default text theme is used on background colors that are tinted with a color that deviates a lot in hue from the hue used as tint color by the TextTheme, it may not fit it so well. The Material-2 opacity-based text styles do not have this limitation. It is unknown why Material-3 switched to a fixed tint color instead of using the opacity-based approach used in Material-2, that is more universally usable on backgrounds with different tint colors.
In Material-3, some component themes override the default color of the default TextTheme TextStyles they use with onSurfaceVariant. This color has slightly more tint and lower contrast than the default onSurface. This is used for elements in components that should have less emphasis. Many default Material-3 components also override the color in default TextTheme TextStyles they use with ColorScheme.onSurface color, that it actually already has in a default TextTheme. These two overrides results in that whatever color the default TextTheme TextStyles have, they will be overridden by these ColorScheme colors. Resulting in that any custom-colored TextThemeand its TextStyles are not getting used by such Material-3 components and that the custom colors from the meticulously colored custom TextTheme, are rarely visible anywhere in a Material-3 application. Material-2 component themes do not do this, nor did older Flutter versions of Material-3 component themes do this.
An issue has been raised explaining the challenges this newer approach in Flutter causes when using custom colored text themes. If this issue is addressed, the tinted TextTheme feature in FCS may be brought back if it is a requested feature.
In current Flutter versions, using a custom-tinted TextTheme is rather pointless. You can, but it is not enough to define the TextTheme. You also have to pass each tinted TextStyle it has to the appropriate TextStyles in ALL component themes that override its colors, for it to have any effect. It is typically not worth the effort.
NEW
The Theme Code view panel now has a toggle that allows you to generate the configured code for the theme as input suitable for a separate app theme file. It has static getters that you can use in your MaterialApp's theme and darkTheme.
TIP: You can modify this file and e.g., pass in controller that contains user-configurable settings for theme configuration properties and generate the theme on the fly in your app. This way you can let the user configure the theme in your app, a few props anyway. This is basically what the Playground app does with all theming properties. That is why you can see the result and impact of defined theme in the Playground app itself, as you modify the desired theme configuration in the app.
The Theme Code view got a long asked for feature, Themes Playground settings export and import! You can now export your configured theme settings to a JSON file and import them back into the Playground later. This is a great way to save your theme settings for later use or to share them with others. The exported JSON file contains all the internal controller settings values you have configured in the Playground that are needed to restore a given configuration state. This Playground feature was contributed by GitHub user @akiller in !PR 257. Thank you!
The contributed feature got enhanced with more error handling and a slightly refined UI to make it production ready.
As a further enhancement of the JSON export feature, the Themes Playground app also got the ability to convert the exported settings JSON config to a shareable URL. You can now share Playground settings with other Flutter developers.
On each theme settings panel, many controls now appear in two columns to reduce the need to scroll so much on wider media and see more controls on the same screen. The layout is panel width responsive and controls will be in one column as before on smaller media.
Split the "FAB and Chip" settings panels to separate panels FAB and Chip.
Split the "BottomAppBar and SearchBar" panels to separate panels SearchBar and BottomAppBar.
On the surface Color Blends settings panel, you can choose which surface color the scaffold background color will use as its starting point surface color and as base for the blend level and mode. You can also select any ColorScheme color and use it as an override for the scaffold background color. This will override any blended color result as well as the plain white and true black settings.
The ColorScheme settings panel got five new settings:
contrastLevel property in ColorScheme.fromSeed. It is used to control the contrast level of the generated scheme colors. It will most likely land in the next stable Flutter release after 3.24. With FCS V8 you can use it already now.fixed, onFixed, fixedDim and onFixedVariant colors, when a seed generated ColorScheme is NOT being used.fixed, onFixed, fixedDim and onFixedVariant colors to the Material-3 design specified values 90, 10, 80, 30 or and or opt-in on an alternative set 92, 6, 84, 12 that have higher contrast.onPrimaryContainer, onSecondaryContainer, onTertiaryContainer and onErrorContainer have changed from tone 10 to 30 for LIGHT theme mode. This change will land in Flutter when the Material Color Utilities (MCU) package is updated to at least 0.12.0. This has not been done even in master (Sep 3, 2024).
Added customizable error colors to the custom scheme. Only available when Use Material3 error colors setting is OFF, when using the custom scheme on Input Colors and ColorScheme settings panels.
Added using error color as a seed color for error tonal palette in the ColorScheme settings panel. The tonal palette now also supports using a custom error color to generate its tonal palette.
Added error color and error container color locking to the ColorScheme settings panel.
Added code gen for custom error colors.
Added ColorScheme code generation for all the new ColorScheme colors introduced in Flutter 3.22.
Added showing the new Flutter 3.22 ColorScheme colors in the Effective Colors panel.
Added showing the new Flutter 3.22 ColorScheme colors in the ColorScheme settings panel.
Added showing the new Flutter 3.22 ColorScheme surface colors in the Color Blends settings panel.
Added support for using MCU and FSS based seed generated ColorScheme variants using FlexSchemeVariant.
Added code generation for the new MCU and FSS scheme variants.
FlexColorScheme.variant API with FlexSchemeVariant and for FSS based variants it uses FlexColorScheme.tones API with FlexSchemeVariant and its tones getter.FlexTones modifiers only show up on FSS based variants with FlexColorScheme.tones API, as they are not available when using the FlexColorScheme.variant API.Added the FFS seed option "Monochrome surfaces" introduced in package FlexSeedScheme 3.0.0.
Added an Apply ColorScheme to all Cupertino components setting to the Component Themes settings panel
cupertinoOverrideTheme: const CupertinoThemeData(applyThemeToAll: true) and generate code for it and applies the setting to the Playground app's theme as well.In the Switch, Checkbox and Radio settings panel, the Switch now has a platform adaptive theme setting for theming the Material Switch to look close to the iOS CupertinoSwitch.
On the surface Color Blends settings panel, you can now select a scheme color to use as the theme resulting Scaffold Background color. The selection is independent for light and dark theme mode.
Added separate controls and code gen for light and dark mode background color selection for the BottomAppBar on settings panel BottomAppBar.
Added divider color selection to Dialogs settings panel for the DatePicker divider color. Setting it to transparent will hide the divider in Material-3 mode, in Material-2 mode the Divider does not exist. Also added feature to allow selection of DatePicker header foreground color independently of the used background color. Previously it always used the contrast pair of the background color, which is still the default if you do not select a custom foreground color.
Added the ability to change tab alignment in the TabBar settings panel.
In the Floating Action Button settings panel, added the ability to change the foreground color of FAB to something that is not its automatic on-color pair.
To TextField settings panel, added the ability to change the focused suffix icon color. The TextField also got controls for dense input decorator and custom content padding, as well as for using a platform adaptive border radius. It also has two new pre-made design examples. In addition to selecting Material-3 default and Playground defaults, you can now also use "Colored outline" and "Dense, no focused border" as design examples or as TextField starting configuration points.
To AppBar settings panel, added the Center title setting to control if the title is centered or not. This API has been available in FCS since v6, but not offered in the Playground, now it is in the Playground too.
To the AppBar settings panel, title foreground color, leading icon and actions icon color settings were added.
The Chip settings now include separate color for the `ChoiceChip (called Suggestion Chip in M3 design). The feature that blends the selected main overall Chip color was made optional. It is a useful feature due to the limited independent theme control over the Chips.
The Chip settings panel now includes font size and padding controls.
The ListTile settings panel now includes a large number of theming controls for ListTile theming.
The SearchBar settings panel now includes theming controls for SearchBar and SearchView theming.
On the Adaptive Theming settings panel you can now also control the MaterialTapTargetSize setting.
The Segmented Buttons settings panel now includes a control for selected foreground colors for both SegmentedButton and ToggleButtons.
Added feature #224 that adds Card.filled and Card.outlined to widget showcase. They are also used in the "Card" settings" panel for card presentation.
The Playground can now also show the used color tones numbers for MCU based generated dynamic color schemes, also when they use dynamically obtained tones and when e.g., contrast level is adjusted. This feature is computationally complex and quite expensive, but we thought it was worth it to show the correct palette color tones also for DynamicScheme variants.
CHANGE
The optional staggered grid-based Playground UI was removed.
No longer generate any code for useMaterial3: true value. The FSS default is now true and we thus no longer explicitly need to add API code gen when the setting is ON.
The Introduction panel's content was updated.
The Playground defaults the replacement for useTextTheme, the useMaterial3Typography to null. This makes Material-2 and Material-3 mode use their respective mode-based typography by default. If you still make a Material-2 app, prefer using Material-3 typography and set it to true, like the Playground did before. Material-3 typography is much nicer than Material-2 typography. This is not a breaking API change, just a change in the default value used when you rest the Playground to its default values. Turn it ON in TextTheme settings, to get the same config as you did with a reset before. If you use Material-3, this Playground settings change has no impact on your theme result.
Updated the presentation of Switch, Checkboxand Radio on their settings panel.
Changed the name of the "Theme colors" settings panel to Input Colors.
Changed the name of the "Surface blends" settings panel to Color Blends.
Changed the name of the "Component Themes" settings panel to General Settings.
Changed the order of topic panels. The General Settings, Adaptive Theming and Shape Radius panels now come before the color panels.
The feature Swap secondary and tertiary legacy colors in Material-3 on the Input Colors settings panel is now OFF by default. The settings info expand explains when it is preferable to use it.
The feature Use TextField's InputDecorationTheme in picker dialogs on the "Dialog" settings panel is now OFF by default.
Modified settings panel background and header colors, as well as theme selector buttons to use suitable new ColorScheme surface theme colors, instead of computing their own shades from theme colors.
Changed surface and on-color blends to default to 0. Blends are not ON by default anymore in Playground. The feature is still very cool and useful for many different design goals.
Adjusted the code gen for surface colors setting "Main and container colors on color blending" to handle the new FlexSubThemesData.blendOnColors default being false instead of true. The Playground still by default sets blendOnColors to true for dark mode and defaults to false for light mode. This is done to mimic seed generated ColorScheme behavior, when not using seed generated colors.
Update Material-3 default info for BottomAppBar to surfaceContainer.
Improved the Chip presentation, by having them in own wraps per type and a column that names the Chip type with both Flutter and Material-3 naming
Improved IconButton presentation, by adding a text column explaining the type, as on the Chips panel.
Improved presentation of Switch, Checkbox and Radio, by using more orderly columns and spacing and explanation labels, similar style as on Chip and IconButton.
The Playground default for the TextField settings panel is still using "Outline" and filled as default, not "Underline" and filled style like Flutter SDK does. The FCS API defaults to underline, only the Playground comes with a slightly opinionated nicer default. Playground TextField default, along with FCS API, it was changed to not using color on the unfocused border, like Flutter M3 and M2 default styles do. Making both Playground and FCS API less opinionated in its default values in this case.
In General Settings, the Playground by default turns ON the settings "Use Material-2 style Divider in Material-2", "Tinted disabled components" and "Tinted interaction". Corresponding to FlexSubThemesData for useM2StyleDividerInM3, interactionEffects and tintedDisabledControls being set to true. Their FCS API defaults are however false, to keep the API itself less opinionated. Before FCS v8, these API defaults were true as stated in breaking changes. The Playground thus keeps this past, already in API opinionated defaults, as its pre-configured defaults, but the defaults for the FCS API itself, in Material-3 mode, are much less opinionated now.
In Navigation Rail panel settings, the "Labels when collapsed" defaults to "All items have labels". This means that navigationRailLabelType: NavigationRailLabelType.all is used by default in Playground generated FlexSubThemesData() passed to subThemesData, thus applying what was API default before. When you create a new theme with the Playground, you get same style as before. If you migrate from V7 you will need to set NavigationRailLabelType.all in yur old theme to get the same Rail style, if you had not defined it explicitly before.
The NavigationRail settings panel got controls for selected and unselected label size, as well as selected and unselected icon size. The panel now also has settings for collapsed and expanded rail widths and destination group alignment.
The NavigationBar settings panel got controls for selected and unselected label size, as well as selected and unselected icon size.
The BottomNavigationBar settings panel got controls for selected and unselected label size, as well as selected and unselected icon size. The BottomNavigationBar animates their size transitions as it is intended to use different sizes for selected and unselected item. The NavigationBarna dNavigationRail do not animate their item size changes, but you can still use it.
Changed how ALL opacity sliders work. They now all work with default (null) color and opacity is also nullable. If the SchemeColor it is used on is null, it will use the default color and apply opacity on it. It is no longer required to select the same color as default to apply opacity anywhere.
Major internal refactor of all Sliders used in the Playground. Converted the Sliders to custom composed SliderListTileReveal, a combo convenience widget used for Sliders with a null default value. Also having separate labels for disabled and null default values, and a built info ListTileReveal.
Changed the style and speed of all popup menus. They are more compact with smaller font, and open under the ListTile you open them from, when there is room to do so. They also have no animation to open quickly and more desktop like, as this app is intended to be used primary on desktop. Their states now communicate the default for their settings better when FCS is used, as well as when FCS is disabled.
DETAILS: The bulk of used popups components in the Playground are now using a shared a generic
EnumPopupMenu<T extends Enum>, based onListTileandPopupMenuButtonthat now supports nullable enums and has built-in support for null selection and disabled defaults. It also has built-inListTileRevealfor info expand reveals. There are still a few special case popups that have some specialized features likeColorSchemePopupMenubut it is based on the same design. It needs to be able to communicate a large number of default color values for its color default labels, depending on active theme state, so it supports things likedefaultLabel,defaultLabelDark,defaultLabelM2,defaultLabelDarkM2,defaultDisabledLabel,defaultDisabledLabelDark,defaultDisabledLabelM2anddefaultDisabledLabelDarkM2. This refactoring was also in preparation for adding more features, as it makes it easier to add enum based props. Sadly the refactor and migration of the Playground to use these components took a long time and delayed the release at least two weeks, maybe more. Some snafus in shown default value labels may also exist concerning colors, due to this refactor.
Updated the official Material-3 demo app in the Theme Simulator to a version with the same look as the latest official version. The updated version now also uses the demo's new Sliver-based cached scrolling. The version is still a fork, with some tweaks to make it work when embedded into the Playground simulator and getting its theme from the Playground and not inside the demo app. The fork also has a denser two-column layout with different breakpoints. This was done so that we in portrait mode can get two columns with a NavigationRail already on iPad Pro 11" and the expanded Rail on iPad Pro 12.9".
In the ColorScheme panel, we brought back the ColorScheme color hover that highlights its color source tone in the Tonal Palette above. This feature existed before, but started causing issues on WEB builds and was removed 16.3.2023. It has now been brought back, and we will test if it works better now. It is a nice feature to see where the color comes from in the palette.
The controls to test settings for platform adaptive responses are now hidden behind an expanding ListTile. This is used on every panel where the controls exist. It is intended to make the UI less cluttered, the controls are not used so often.
FIX
fabSchemeColor: SchemeColor.secondary selection was not generated.FlexAdaptive.setting value FlexAdaptive.appleWeb did not return AdaptiveTheme.appleWeb when selected, it returned FlexAdaptive.apple. This only impacted simulation of responsive themes for the Apple and Web response in the Playground app. Themes using this feature worked correctly.The most critical changes to migrate from FlexColorScheme V7 to V8 are listed below. For a full list of all breaking changes, see PACKAGE CHANGES and…
Oct 26, 2024
Version 8.0.0 makes FlexColorScheme fully aligned with Flutter's MAJOR BREAKING Material-3 theming changes introduced in Flutter version 3.22. Due to Flutter 3.22 breaking many past Material styles, introducing new colors to ColorScheme and deprecating three colors, FlexColorScheme had to undergo major revision and also break many of its past styles and some older APIs.
Most APIs are still there and work as before, but a few produce results that differ slightly from past ones, just like Flutter 3.22 also does over previous versions. Generally, the upgrade should be smooth, but you may need to review the produced theme result to see that you don't get any changes that don't fit with your design goals. Some past defaults have changed in FCS V8, but previous values are still available. You will need to enable them explicitly to get the same results as before. The purpose of these default value changes is to make FCS have less opinionated defaults, and be more aligned with Flutter's Material-3 design defaults. The Themes Playground app will still have some of its own opinionated defaults, done via default settings values the app uses in its default configuration, but the package Material-3 default starting points, are now much more aligned with Flutter's Material-3 defaults.
In the Themes Playground you can now export and import settings to a JSON file, and import them back into the Playground later. This is a great way to save your theme settings for later re-use. The exported JSON contains all the internal controller settings values you have configured in the Playground app, that are needed to restore a given configuration state. This Playground feature was a nice contribution by GitHub user @akiller in !PR 257, thank you! This contributed feature got enhanced with more error handling and a slightly refined UI to make it production ready. It can now be tried for the first time in the 8.0.0-dev.2 release and build. As a further enhancement of the JSON export feature, the Themes Playground app also got the ability to convert the exported settings JSON config to a shareable URL. You can now share Playground settings with other Flutter developers.
The most critical changes to migrate from FlexColorScheme V7 to V8 are listed below. For a full list of all breaking changes, see PACKAGE CHANGES and the BREAKING part further below.
The flag useMaterial3 now defaults to true in FlexColorScheme and FlexThemeData constructors. Set it to false to explicitly use Material-2 theming. It defaulted to true before. Material-2 is still fully supported in FCS v8 and Flutter v3.24, but will eventually be deprecated in Flutter, when that happens, it will also happen in FCS.
With the Themes Playground app, you can use a pre-configured Material-3 based theme that looks very similar to legacy Material-2 design. This will continue to be available also after Material-2 is deprecated in Flutter.
The FlexSubThemesData properties interactionEffects, tintedDisabledControls, defaultUseM2StyleDividerInM3 and blendOnColors now all default to false. In previous versions they defaulted to true. If you before had not explicitly turned these properties false, they were all true by default. To get the same result as before in FCS V8, you now have to set these properties to true. This change was made to have fewer opinionated defaults in FCS to align it more with Flutter SDK default styles.
The FlexSubThemesData property navigationRailLabelType no default to NavigationRailLabelType.none. To get the same result as before by default, you will need to set it to NavigationRailLabelType.all. This change was made to have fewer opinionated defaults in FCS to align it more with Flutter SDK default styles. The Playground defaults it to NavigationRailLabelType.all by adding this by default to new default themes.
Since ColorScheme.background color was deprecated in Flutter 3.22.0 we can no longer use it as a part of surface blends and its modes. For example, when surfaceMode is set to FlexSurfaceMode.highBackgroundLowScaffold it now uses surface and dialog blends set to 2x instead of 1x, so that it represents the "high background" style as before, but done via surface color. Without this breaking change, this mode would produce the same result as FlexSurfaceMode.levelSurfacesLowScaffold and be redundant.
ColorScheme colors background, onBackground and surfaceVariant.This major release has many breaking changes forced via breaking changes in Flutter 3.22.0. Due to this, the release also uses this opportunity to clean up APIs with opinionated defaults, like the ones mentioned above. There are additional smaller and more subtle changes in defaults values, that align FCS to use the same color defaults from the new ColorScheme colors, that Flutter started using in version 3.22.0 as well. You can find all the details below in the PACKAGE CHANGES chapter.
Flutter 3.22 introduced a large number of breaking changes to the ColorScheme and default color mappings that Flutter's Material components use. In total, the Flutter 3.22.0 release adjusted 249 of its own internal tests to accommodate for new Material-3 spec changes, that all broke past Flutter Material-3 component styles. For a reference to the broken and updated tests, see this issue side comment.
FlexColorScheme V8 now allows you to use the new colors introduced in Flutter 3.22. As before, with FCS you can get fully defined hand-tuned ColorSchemes without using Material-3 design's Material Color Utilities (MCU) based seed-generated ColorSchemes. You may prefer to use seed generated ColorSchemes with Material-3, but it is nice to know you do not have to.
To the seed generated ColorSchemes, FCS adds support for all the Flutter DynamicSchemeVariant seed generated variants. It also improves them by allowing you to use separate seed colors for each palette. With Flutter's ColorScheme.fromSeed, you can only seed with one color, the primary color. The resulting ColorScheme always uses computed values for secondary and tertiary palettes, plus a hard coded fixed color for the error palette seeding. Surfaces colors are always tied to primary color as well and include a hint of primary color. With FCS, you do not have these limitations, you can seed with separate colors for each palette with even with Flutter's own dynamic scheme variants. This was always possible with FlexColorScheme and its FlexSeedScheme (FSS) based FlexTones, seed generated scheme variants. FCS now brings this feature to Flutter's own dynamic scheme variants as well.
As before, FCS also has its own even configurable FlexTones way of making seed generated ColorSchemes. Typically, you use predefined FlexTones, but you can also create your own FlexTones configurations. With it, you can define the chroma goals for each palette and define which tone is mapped to what ColorScheme color. An internal example of using them is the implementation of FlexTones modifiers.
FlexColorScheme V8 adds three new FlexTones modifiers. The most useful one is called monochromeSurfaces(). This tone modifier makes the surface shades of any used FlexTones configuration use monochrome greyscale shades for the surface and surface variant palettes. It thus gives us greyscale colors for ALL surfaces, instead of primary-tinted ones. It can be applied to any FlexTones seed generated scheme variant. The other new modifiers are expressiveOnContainer() and higherContrastFixed(). Check the API docs for more details.
TODOS BEFORE STABLE RELEASE
MINOR KNOWN ISSUES
This section contains a detailed list of all changes introduced in FlexColorScheme version 8.0.0.
BREAKING CHANGES
This version contains a lot of breaking changes due to updates in the Material-3 ColorScheme in Flutter 3.22. At the same time, this release uses the forced breaking change to clean up some older APIs. FCS is now more aligned with Flutter's Material-3 theming defaults, by typically using them as starting points in the default Material-3 mode. Material-2 mode is still supported, it has its own opinionated defaults as before.
The ThemeData flag useMaterial3 is now true by default to align with Flutter 3.16.0 and later default for ThemeData. To continue using Material-2 theming, set useMaterial3 to false. All component themes in FlexSubThemes that have a useMaterial3 property now also default to true.
Keeping to Material-3 defaults, in the theme factories light and dark, if scheme is undefined it now defaults to FlexScheme.materialBaseline the Material-3 baseline scheme, when useMaterial3 is true. If useMaterial3 is false and schemeis undefined, it defaults to FlexScheme.material, the default Material-2 theme, as before.
Removed ALL references to in Flutter 3.22 deprecated ColorScheme colors background, onBackground and surfaceVariant. They are not used in FCS anymore. The background color was critical for FCS surface blending, it is now handled differently. The removal of these ColorScheme colors had far-reaching, but typically still subtle implications on styles created by FCS. There are many breaking minor style changes in this release due to this. Here are the critical changes caused by all these breaking changes in Flutter 3.22:
background and onBackground colors in FlexColorScheme, FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light and FlexThemeData.dark factories. They are not used anymore. Use surface and onSurface colors instead.background, onBackground, surfaceVariant from FlexSchemeOnColors and FlexSchemeSurfaceColors. They are no longer used and have no function. They were deprecated since the same colors were deprecated in ColorScheme in Flutter 3.22.surfaceVariantAlpha and backgroundAlpha colors in FlexAlphaValues. They are not used anymore and have no function, use surfaceAlpha instead. They were deprecated since the colors they related to were deprecated in ColorScheme in Flutter 3.22.FlexSchemeSurfaceColors.blend factory constructor produces slightly different blend result than in earlier versions. Because Flutter 3.22 deprecated ColorScheme colors background, onBackground and surfaceVariant, that were used in the blend calculation earlier. It is no longer possible to produce the same results as before, but the results are equivalent to previous design intent. With one exception, using surfaceMode with FlexSurfaceMode.highBackgroundLowScaffold sets surface and dialog blends to 2x instead of 1x, so that it represents the "high background" style as before, but done via surface. Without this breaking change, this mode would produce the same result FlexSurfaceMode.levelSurfacesLowScaffold and be redundant.SchemeColor removed all the corresponding colors that Flutter 3.22 deprecated. This is a VERY breaking change and will break your code if you happened to use any of the removed enum values. This may likely happen. The removed enum values are: SchemeColor.background, SchemeColor.onBackground and SchemeColor.surfaceVariant. For background Flutter recommends that you should use the values SchemeColor.surface and SchemeColor.onSurface instead and for surfaceVariant the SchemeColor.surfaceContainerHighest is recommended. In all cases you can try the other new surface colors as well, to see what best fits your design goals and intent.SchemeColor got support for all the new colors in Flutter 3.22 ColorScheme. It also removed the colors Flutter 3.22 deprecated. The order of the enum values was modified. This will break usage that depends on the enum's index, for example, storage of the values for implementations that depend on the index value.systemNavBarStyle in FlexColorScheme.themedSystemNavigationBar now defaults to FlexSystemNavBarStyle.surface, instead of FlexSystemNavBarStyle.background. Using FlexSystemNavBarStyle.background results in the color Theme.of(context).colorScheme.surfaceContainerLow being used, where it previously was Theme.of(context).colorScheme.background. This is because Flutter 3.22 deprecated ColorSCheme.background.FlexAppBarStyle value background now results in the AppBar using the surfaceContainerLow color instead of background. This breaking change was introduced because of the breaking change in Material-3 in Flutter 3.22 where the color background was deprecated. The new color is kind of the best match for the old background color in a typical FCS configuration.FlexSystemNavBarStyle value background now results in the app bar using the surfaceContainerLow color instead of background. This breaking change was introduced because of the breaking change in Material-3 in Flutter 3.22 where the color background was deprecated. The new color is kind of the best match for the old background color in typical FCS configuration.Breaking rename: All helper component themes in FlexSubThemes ended with Theme, as designed, except FlexSubThemes.bottomNavigationBar. This mistake is now corrected, it was renamed to FlexSubThemes.bottomNavigationBarTheme. The old version is deprecated and passes its props through to the renamed version. The old and wrong named one will be removed in version 9.0.0.
Deprecated FlexSubThemesData.blendTextTheme, it no longer has any function. See topic "Why is blendTextTheme deprecated?" further below for more information,
Deprecated the FCS legacy property useFlutterDefaults. FlexColorScheme in Material-3 mode now defaults to using Flutter default styles. For other configurations, modify them as desired. In Material-2 mode, FCS continues to use its opinionated own defaults as before, as long as Material-2 exists.
Deprecated the static function FlexColorScheme.createPrimarySwatch, it is no longer used by FlexColorScheme internally, it is now deprecated in FlexColorScheme and will go away in V9. After this, you will still be able to find this function in ColorTools in the package flex_Color_picker, where it will remain available.
Replaced the FCS legacy property useTextTheme with a more feature correctly named property useMaterial3Typography. Use it instead. The useTextTheme originally had another function in much older versions of FCS. Its name no longer represented its function, the new name does. If not defined, the default is true in Material-3 mode and false in Material-2 mode. If you still use Material-2, try setting this to true to get nicer typography in Material-2 mode.
The color material3DarkOnErrorContainer was changed from Color(0xFFFFB4AB) to Color(0xFFFFDAD6) to match the new Material-3 default dark error color used in Flutter 3.22.
Dialog background color now defaults to surfaceContainerHigh with no elevation tint color in Material-3 mode, instead of surface with elevation tint. Breaking change introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The ElevatedButton background color now defaults to surfaceContainerLow with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The PopupMenuButton background color now defaults to surfaceContainer with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The MenuBar background color now defaults to surfaceContainer instead of surface with elevation tint in Material-3 mode. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The produced MenuTheme background color now defaults to surfaceContainer with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22. This affects default background color of the opened menu on MenuBar, MenuAnchor and DropdownMenu.
The BottomSheet background color now defaults to surfaceContainerLow with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The produced DrawerTheme background color now defaults to surfaceContainerLow with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22. This affects the default background color of the Drawer and NavigationDrawer. FCS uses surfaceContainerLow as background color in Material-2 mode by default too.
The produced DrawerTheme width now defaults to 304 dp in Material-3 mode. The [official Material-3 spec is 360 dp](Material-3 spec https://m3.material.io/components/navigation-drawer/specs), FCS was using it, but Flutter SDK has so far "declined" following the Material-3 spec here and still uses the older default 304 dp used in the Material-2 spec. This older default is actually a better choice, so FCS has now opted to revert to using it as default too. For more information about this and why 304 dp is better, see Flutter issue #123380.
The FlexSubThemesData properties interactionEffects, tintedDisabledControls and defaultUseM2StyleDividerInM3 now all default to false. In previous versions they defaulted to true. This change was made to have fewer opinionated defaults in FCS to align it more with Flutter SDK default styles. If you had NOT configured these values before, they defaulted to true. You now have to set them explicitly to true to opt in and get the same results as you got before when they were not configured.
The FlexSubThemesData properties blendOnColors now defaults to false. In previous versions it defaulted to true. This change was made to have fewer opinionated defaults in FCS, to align it more with Flutter defaults. If you had NOT configured this values before, it defaulted to true. You now have to set it explicitly to true to get the same result as before, when it was not configured. Consider setting this property true in dark mode, and false in light theme mode, for a style that matches the Material-3 color design, when you are not using a seed generated ColorScheme. This setting has no effect when using a seed generated ColorScheme, as it generates blended/tinted onColors based on the seed algorithm, that overrides the effect of this setting. This setting creates a similar effect for none seeded ColorSchemes.
The FlexSubThemesData property inputSelectionHandleSchemeColor when not defined, defaults to inputDecoratorSchemeColor and if it is not defined either, the effective text selection handle color result is ColorScheme.primary, same as Flutter SDK default. In previous versions, no definitions, resulted in ThemeData.primaryColorDark being used. This was changed in preparation of Flutter's planned deprecation of primaryColorDark.
The FlexSubThemesData property inputDecoratorIsFilled now default to false when undefined, like Flutter SDK does. Set it to true to get the same style it had with previous undefined value.
The FlexSubThemesData property inputDecoratorBorderType now default to FlexInputBorderType.underline when undefined, producing same default as Flutter SDK does. Set it to FlexInputBorderType.outline to get the same style it had with previous undefined value.
The FlexSubThemesData property inputDecoratorUnfocusedBorderIsColored now default to false when undefined, like Flutter SDK does. Set it to true to get the same style it had with previous undefined value.
In FlexSubTheme.InputDecorationTheme the following properties have new breaking default values: filled default to false, borderType default to FlexInputBorderType.underline and unfocusedBorderIsColored to false.
The FlexSubThemesData properties navigationRailMutedUnselectedLabel and navigationRailMutedUnselectedIcon now default to false. In previous versions they defaulted to true. This change was made to have fewer opinionated defaults in FCS and follow Material-3 design spec by default.
The FlexSubThemesData properties navigationRailUseIndicator now defaults to null, resulting in true being used in Material-3 mode and false in Material-2 mode. In previous versions it defaulted to true. This change was made to have fewer opinionated defaults in FCS and follow Material design specs for default values. If you still use Material-2, you now have to set this to true to see the indicator. The Playground now always sets either true or false in both modes, it never leaves out the default choice in generated config code. The field is nullable, and you can now also get the M2/M3 different default styles, by not defining this property at all.
In FlexSubThemes.navigationRailTheme the properties mutedUnselectedLabel and mutedUnselectedIcon now default to false if undefined. In previous versions they defaulted to true. Property selectedLabelSchemeColor defaults to onSurface and unselectedLabelSchemeColor default to onSurfaceVariant, they were primary before. Property unselectedIconColor now defaults to onSurfaceVariant it was onSurface. Property selectedIconColor now defaults to onSecondaryContainer it was primary. Property labelType now defaults to NavigationRailLabelType.none it was NavigationRailLabelType.all.
The FlexSubThemesData properties navigationRailUnselectedLabelSchemeColor and navigationRailUnselectedIconSchemeColor now default to onSurfaceVariant (was onSurface). The onSurfaceVariant is used as on color pair default when any surface color is used as background color for the rail, if a none surface color is used as background scheme color, its contrast color pair is used as default for the labels and unselected icons. The navigationRailSelectedIconSchemeColor will if undefined, default to the contrast color pair for navigationRailIndicatorSchemeColor. These default behaviors result in less configuration in typical designs, while starting points defaults are the same as before and full configuration options are also available as before. The equivalent colors in FlexSubThemes.navigationRailTheme behave the same way.
The FlexSubThemesData properties navigationBarMutedUnselectedLabel and navigationBarMutedUnselectedIcon now default to false. In previous versions they defaulted to true. This change was made to have fewer opinionated defaults in FCS and follow Material-3 design spec by default.
In FlexSubThemes.navigationBarTheme the properties mutedUnselectedLabel and mutedUnselectedIcon now default to false if undefined. In previous versions they defaulted to true. Property selectedLabelSchemeColor defaults to onSurface and unselectedLabelSchemeColor default to onSurfaceVariant, they were primary before. Property unselectedIconColor now defaults to onSurfaceVariant it was onSurface. Property selectedIconColor now defaults to onSecondaryContainer it was primary.
The FlexSubThemesData properties navigationBarUnselectedLabelSchemeColor and navigationBarUnselectedIconSchemeColor now default to onSurfaceVariant (was onSurface). The onSurfaceVariant is used as on color pair default when any surface color is used as background color for the rail, if a none surface color is used as background scheme color, its contrast color pair is used as default for the labels and unselected icons. The navigationBarSelectedIconSchemeColor will if undefined, default to the contrast color pair for navigationBarIndicatorSchemeColor. These default behaviors result in less configuration in typical designs, while starting points defaults are the same as before and full configuration options are also available as before. The equivalent colors in FlexSubThemes.navigationBarTheme behave the same way.
The FlexSubThemesData properties bottomNavigationBarMutedUnselectedLabel and bottomNavigationBarMutedUnselectedIcon now default to null, resulting in true being used as default in Material-2 mode and false in Material-3 mode. In previous versions these properties defaulted to true in both modes. This change was made to have fewer opinionated defaults in FCS.
The FlexSubThemesData properties bottomNavigationBarUnselectedLabelSchemeColor and bottomNavigationBarUnselectedIconSchemeColor now default to onSurfaceVariant in Material-3 mode, it was onSurface, which remains the default in Material-3 mode. In Material-3 mode, the onSurfaceVariant is used as on color pair default when any surface color is used as background color for the navigation bar. If a none surface color is used as background scheme color, its contrast color pair is used as default for the labels and unselected icons, in both Material-2 and Material-3 mode. These default behaviors result in less configuration in typical designs, while starting points defaults are the same as before and full configuration options are also available as before. The equivalent colors in FlexSubThemes.bottomNavigationBar behave the same way.
The FlexSubThemesData property chipDeleteIconSchemeColor now default to SchemeColor.onSurfaceVariant. In previous versions it defaulted to SchemeColor.onSurface. Likewise in FlexSubThemes.chipTheme the property deleteIconSchemeColor now defaults to SchemeColor.onSurfaceVariant if undefined. In previous versions it defaulted to SchemeColor.onSurface. This change was made to adjust to follow updated Material-3 spec defaults.
The FlexSubThemesData property drawerUnselectedItemSchemeColor now default to SchemeColor.onSurfaceVariant, as on color pair default when any surface color is used as drawer background color. Previously it defaulted to onSurface. Likewise in FlexSubThemes.navigationDrawerTheme the property unselectedItemSchemeColor now defaults to SchemeColor.onSurfaceVariant if undefined. This was changed to use ase as Material-3 defaults.
Minor style breaking, the tinted interactions were slightly modified. They are now a bit less pronounced and also have a bit less gray in them.
NEW
Added three new FlexSchemes, called blackWhite, greys and sepia. They are primarily intended to be used as prototype phase color schemes that do not use colors. This can be useful for focusing on features and layout during the early development phase, keeping the discussion away from colors. The schemes can also be used as neutral baselines for custom color schemes, where only a few colors are overridden with custom colors.
The const color definition class FlexColor got 24 new color values to support monochrome greyscale colors for all new surfaces and their on colors for light and dark mode. These are used as starting colors for the new surface colors in the Flutter 3.22 updated and new Material-3 ColorScheme, when a seed generated ColorScheme is NOT used. These colors follow the naming convention lightFlexSurface___ and darkFlexSurface___, plus their on and inverse versions.
Added named bool parameter useOnSurfaceVariant that defaults to false, to FlexSubTheme.schemeColorPair() and to FlexSubTheme.onSchemeColor(), when set to true, the on color onSurfaceVariant is returned instead for onSurface for all surface colors.
Added black, white and transparent as enum values to SchemeColor. These are not ColorScheme colors, but these colors can in many theming situations be useful instead of the ColorScheme based ones.
onSurface.Added all the new surface colors in Flutter 3.22 to FlexSchemeSurfaceColors.
Added all the new on colors in Flutter 3.22 to FlexSchemeOnColors.
The FlexKeyColor class got three new properties, contrastLevel, useExpressiveOnContainerColors and useLegacyMonochromeSeedBehavior. They are used to control seed generation results.
The contrastLevel is used to control the contrast level of MCU generated scheme colors. The contrastLevel parameter indicates the contrast level between color pairs, such as primary and onPrimary. The value 0.0 is the default, standard contrast; -1.0 is the lowest; 1.0 is the highest. From the Material-3 Design guideline, the standard, medium and high contrast options correspond to values 0.0, 0.5 and 1.0 respectively.
contrastLevel property is only available when seed generating a ColorScheme using FlexSeedScheme's SeedColorScheme.fromSeeds when a scheme variant is used where its FlexSchemeVariant.value, isFlutterScheme is true. This set corresponds to all the DynamicSchemeVariants available in the Flutter SDK.contrastLevel is the same as the Flutter contrastLevel property available in ColorScheme.fromSeed. As of Sep 3, 2024, this contrastLevel is still only available in the master channel. It will land in the next Flutter stable, released after Flutter 3.24. With FCS v8 you can use it already now.
When using FSS
tonesbased seed generated schemes or avarianthaving itsFlexSchemeVariant.value,isFlutterSchemeit set tofalse, thecontrastLevelvalue is ignored. Withtonesbased schemes, the contrast level can instead be defined as desired using customFlexTonesconfigurations. There are two predefined higher contrast level tone and chroma mappings available asFlexTones.highContrastandFlexTones.ultraContrast, you can use them as they are, or as examples of how to create your own custom high contrast tone mappings.
The boolean useExpressiveOnContainerColors is used to make the light theme mode colors onPrimaryContainer, onSecondaryContainer, onTertiaryContainer and onErrorContainer more color expressive, at the cost of their contrast level and accessibility. Defaults to false if undefined.
onPrimaryContainer, onSecondaryContainer, onTertiaryContainer and onErrorContainer have changed from tone 10 to 30 for LIGHT theme mode. This change will land in Flutter when the Material Color Utilities (MCU) package is updated to at least 0.12.0. This has not been done even in master (Sep 3, 2024).useExpressiveOnContainerColors to true will make the colors use the new expressive tone. The expressive tone spec is not yet used in Flutter SDK, but is in the Material-3 design spec and also in MCU v 0.12.0. When this change lands in stable Flutter, it will be made ON by default in FCS too. You will still be able to opt out of using it. Flutter SDK and MCU will not contain such an opt-out feature.useExpressiveOnContainerColors to false. With it set to false, you will also keep this preference when the Flutter SDK defaults to using the expressive tones.The boolean useLegacyMonochromeSeedBehavior is used for enabling the legacy behavior for monochrome seed colors
useLegacyMonochromeSeedBehavior to true.false.respectMonochromeSeed in SeedColorScheme.fromSeeds in FlexSeedScheme's internal MCU fork, and sets it !useLegacyMonochromeSeedBehavior. In FSS this feature is opt-in and recommended to be used. Here, in FCS this setting is opt-out if not desired, and it is strongly recommended to use the new behavior. When using useLegacyMonochromeSeedBehavior with
When using
useLegacyMonochromeSeedBehaviorwithDynamicSchemeVariantvariantsfidelityorcontent, for some monochrome input colors they produceprimaryContainerandonPrimaryContaineras well astertiaryContainerandonTertiaryContainercolor pairs, with low contrast. Consider using some other scheme variants with monochrome seed colors. All others work well with any monochrome seed color. This is just how the MCUDynamicSchemesSchemeContentandSchemeFidelityare defined in MCU. They also produce fairly low contrast for these color pairs with very dark seed colors. This behavior with MCU'sSchemeContentandSchemeFidelitycould be fixed in FlexSeedScheme's internal MCU fork, but we want to keep the result of these schemes consistent with MCU.
Added TextStyles for FlexSubThemesData so that:
FlexSubThemes.appBarTheme uses FlexSubThemesData.appBarToolbarTextStyle for its toolbarTextStyle.FlexSubThemes.appBarTheme uses FlexSubThemesData.appBarTitleTextStyle for its titleTextStyle.FlexSubThemes.chipTheme uses FlexSubThemesData.chipLabelStyle for its labelStyle.FlexSubThemes.chipTheme uses FlexSubThemesData.chipSecondaryLabelStyle for its secondaryLabelStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerHeaderHeadlineStyle for its headerHeadlineStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerHeaderHelpStyle for its headerHelpStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerWeekdayStyle for its weekdayStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerDayStyle for its dayStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerYearStyle for its yearStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerRangePickerHeaderHeadlineStyle for its rangePickerHeaderHeadlineStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerRangePickerHeaderHelpStyle for its rangePickerHeaderHelpStyle.FlexSubThemes.dialogTheme uses FlexSubThemesData.dialogTitleTextStyle for its titleTextStyle.FlexSubThemes.dialogTheme uses FlexSubThemesData.dialogContentTextStyle for its contentTextStyle.FlexSubThemes.floatingActionButtonTheme uses FlexSubThemesData.fabExtendedTextStyle for its extendedTextStyle.FlexSubThemes.menuButtonTheme uses FlexSubThemesData.menuButtonTextStyle for its textStyle.FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerDayPeriodTextStyle for its dayPeriodTextStyle.FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerDialTextStyle for its dialTextStyle.,FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerHelpTextStyle for its helpTextStyle.,FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerHourMinuteTextStyle for its hourMinuteTextStyle.,FlexSubThemes.toggleButtonsTheme uses FlexSubThemesData.toggleButtonsTextStyle for its textStyle.FlexSubThemes.segmentedButtonTheme uses FlexSubThemesData.segmentedButtonTextStyle for its textStyle.FlexSubThemes.snackBarTheme uses FlexSubThemesData.snackBarContentTextStyle for its contentTextStyle.copyWith on the produced component themes. With these props you get access to direct TextStyle styling for these component properties in the FCS API too.Added useCupertinoStyle property to FlexSubThemes.switchTheme. Added switchAdaptiveCupertinoLike property to FlexSubThemesData and made FlexSubThemes.switchTheme use it.
Added secondarySelectedSchemeColor, fontSize, secondaryFontSize, iconSize and padding properties to FlexSubThemes.chipTheme. Added chipSecondarySelectedSchemeColor, chipFontSize, chipSecondaryFontSize, chipIconSize and chipPadding properties to FlexSubThemesData and made FlexSubThemes.chipTheme use them.
Added headerForegroundSchemeColor property to FlexSubThemes.datePickerTheme. Added datePickerHeaderForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.datePickerTheme use it for its header foreground color.
Added dividerSchemeColor property to FlexSubThemes.datePickerTheme. Added datePickerDividerSchemeColor property to FlexSubThemesData and made FlexSubThemes.datePickerTheme use it for its divider color.
Added isDense property to FlexSubThemes.inputDecoratorTheme. Added inputDecoratorIsDense property to FlexSubThemesData.
Added contentPadding property to FlexSubThemes.inputDecoratorTheme. Added inputDecoratorContentPadding property to FlexSubThemesData and made FlexSubThemes.inputDecoratorTheme use it.
Added inputDecoratorSuffixIconSchemeColor property to FlexSubThemes.inputDecorationTheme. Added toggleButtonsSelectedForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.segmentedButtonTheme use it.
Added adaptiveInputDecoratorRadius and inputDecoratorRadiusAdaptive properties to FlexSubThemesData. They are used to select platform(s) to an alternative border radius response for the input decorator, for the selected platform(s).
Added minWidth and minExtendedWidth to FlexSubThemes.navigationRailTheme. Added navigationRailMinWidth and navigationRailMinExtendedWidth properties to FlexSubThemesData and made FlexSubThemes.navigationRailTheme use them.
Added tabAlignment property to FlexSubThemes.tabAlignment. Added tabBarTabAlignment property to FlexSubThemesData and made FlexSubThemes.tabBarTheme use it for its. (TODO: Add a note about thrown assert, open an issue in Flutter SDK about it and suggest an alternative solution.)
Added foregroundSchemeColor property to FlexSubThemes.floatingActionButtonTheme. Added fabForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.floatingActionButtonTheme use it for its foreground color.
Added selectedForegroundSchemeColor property to FlexSubThemes.segmentedButtonTheme.
Added segmentedButtonSelectedForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.segmentedButtonTheme use it.
Added selectedForegroundSchemeColor property to FlexSubThemes.toggleButtonsTheme.
Added toggleButtonsSelectedForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.toggleButtonsTheme use it.
Added appBarForegroundSchemeColor, appBarIconSchemeColor and appBarActionsIconSchemeColor properties to FlexSubThemesData and made FlexSubThemes.appBarTheme use it for its colors on title, icon and actions.
Added bottomAppBarHeight property to FlexSubThemesData and made FlexSubThemes.bottomAppBarTheme use it as its height value.
Added scaffoldBackgroundBaseColor property to FlexSubThemesData. It is a FlexScaffoldBaseColor enum that can be used to select the base color used as Themedata.scaffoldBackgroundColor in a theme. The selected base color is modified by used surfaceMode and blendLevel] in the FlexColorScheme's light and dark factory constructors.
Added scaffoldBackgroundSchemeColor property to FlexSubThemesData and made ThemeData.scaffoldBackgroundColor use it as an override color, if it is defined. Setting scaffoldBackgroundSchemeColor will override any blended background or true black or plain white setting.
Added cupertinoOverrideTheme to FlexColorScheme constructor and to FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light and FlexThemeData.dark factory constructors.
Added enum variant a FlexSchemeVariant to FlexColorsScheme and FlexThemeData light and dark. This is used to define the variant of the seeded ColorScheme. It is an alternative to tones that also includes scheme seed variants that Flutter SDK added in version 3.22.2.
Added enhanced enum functions data and colors to the FlexScheme enum, that returns the predefined FlexSchemeData and FlexSchemeColor respectively, that are associated with a given enum value. This could be done already using the FlexColor.schemes map. This is a convenience API to be able to use e.g. FlexColor.mango.data to get the predefined FlexSchemeData for the mango enum scheme and e.g. FlexColor.barossa.colors(Brightness.dark) to get the pre-defined dark colors used for the barossa scheme colors. See feature request: https://github.com/rydmike/flex_color_scheme/issues/210
Added ability to use custom seed key colors to FlexKeyColors.
Added support for error colors to FlexKeyColors.
Added direct color properties for errorContainer and onErrorContainer to FlexColorScheme, FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light, FlexThemeData.dark. It was required to support custom error container colors in the FlexKeyColors API.
Added Color properties primaryLightRef, secondaryLightRef and tertiaryLightRef to FlexSchemeColor.
FlexSchemeColor made for light mode in the dark mode FlexSchemeColor. This is used to create computed "fixed" and "fixedDim" colors for dark mode and the light mode ColorScheme that are identical in light and dark mode.FlexSchemeColor(), FlexSchemeColor.from(), FlexSchemeColor.effective() and FlexSchemeColor.toDark() work correctly with the new primaryLightRef, secondaryLightRef and tertiaryLightRef properties.light color properties in FlexSchemeData static FlexSchemeColor color definitions, as lightRef colors in their dark mode equivalent FlexSchemeColor. That was 156 color values to add to the 52 dark FlexSchemeColor definitions.Added fixedColorStyle to FlexColorScheme, FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light, FlexThemeData.dark. It was required to support custom error container colors in the FlexKeyColors API. The property is an enum FlexFixedColorStyle, that allows us to choose the style of the generated "fixed" and "fixedDim" colors when not using seed generated color schemes.
Added Color properties primaryLightRef, secondaryLightRef and tertiaryLightRef to FlexColorScheme.dark and FlexThemeData.dark. If you use the override colors primary, secondary or tertiary and are not using seeded ColorScheme, you need them to provide the correct light mode reference colors for computing fixed colors that will match the light mode fixed colors, for that it is required to know what the light mode colors are. If you are seeding and use the overrides, and will switch between seeded and not seeded, you can provide the override for the not seeded values in primary, secondary or tertiary, and the ref to their seed colors from light mode, in the light ref colors. If you always seed when using the overrides, you can also provide the seed colors in the primary, secondary or tertiary overrides, the light refs fall through to these colors in that cases if not provided during seeding.
Added style navigationBar to enum FlexSystemNavBarStyle that use the color for default or themed NavigationBar background color on the system navigation bar helper.
navigationBar option does not require using the edge-to-edge config required when using transparent system navigation bar to see things behind it. The transparent option sets edge-to-edge mode behind the scenes when used. This can cause some layout changes that must be considered in the app design when used. This is an optional way to style the system navigation bar to match the app's themed NavigationBar background color, without using edge-to-edge Android screen mode.Added ListTile theming support to FlexSubThemesData and made corresponding FlexSubThemes.listTileTheme properties use them in FlexColorScheme as ListTileTheme theming properties.
FlexSubThemesData properties were added: listTileSelectedSchemeColor, listTileIconSchemeColor, listTileTextSchemeColor, listTileTitleTextStyle, listTileSubtitleTextStyle, listTileLeadingAndTrailingTextStyle, listTileTileSchemeColor, listTileSelectedTileSchemeColor, listTileContentPadding, listTileHorizontalTitleGap, listTileMinVerticalPadding, listTileStyle, listTileTitleAlignment and listTileControlAffinity.Added SearchBar and SearchView theming support to FlexSubThemesData and made corresponding FlexSubThemes.searchBarTheme and FlexSubThemes.searchViewTheme properties use them in FlexColorScheme as SearchBarThemeData and SearchViewThemeData theming properties.
FlexSubThemesData properties were added: searchBarBackgroundSchemeColor, searchViewBackgroundSchemeColor, searchBarElevation, searchViewElevation, searchBarRadius, searchViewRadius, searchViewHeaderHeight, searchBarTextStyle, searchViewHeaderTextStyle, searchBarHintStyle, searchViewHeaderHintStyle, searchViewDividerColor, searchBarShadowColor, searchBarTextCapitalization, searchBarPadding, searchBarConstraints, searchViewConstraints and searchUseGlobalShape.CHANGE
Changed all internal usage of MaterialStateProperty and MaterialState to use new WidgetStateProperty and WidgetState introduced in Flutter 3.22 and later.
Static functions FlexSubThemes.schemeColor and FlexSubThemes.onSchemeColor now support the updated SchemeColor and ColorScheme.
Improved the theming logic for Card theme.
Card.outlined variant for the default case at least. This Flutter theming limitation and impact is thus now the same in FCS, as it is with vanilla Flutter ThemeData and its CardTheme. It is still broken as mentioned in the above issue, but that is a Flutter theming issue and limitation that FCS cannot fix.Changed the FlexSubThemes.inputDecoratorTheme to use only border and its WidgetState for its theme. It offers more and nicer control over hover state than using the older legacy more limited border styles. Found a related Flutter SDK issue. Using themed activeIndicatorBorder and outlineBorder do not work at all, they should work, but everything must be done via border property to get the border style, this is a bit more involved API. It is a bug in how the decorator theme is used in Flutter, only the Material-3 default themes considers and uses themed activeIndicatorBorder and outlineBorder.
FIX
Fixed #198 AppBar color issue when using seed generated scheme with key color locked.
Fixed that the Rectangular Slider value indicator did not default to primary color when undefined, as intended in FCS M2 and M3 mode. Only the Drop style indicator defaulted to primary. This came from the framework defaulting the old M2 rectangular indicator to a complex, opacity and alpha blended onSurface grey looking result.
The blendTextTheme feature was originally made before Material-3's TextTheme was available, before it was fully known how it was going to be implemented. It was an approximation of the TextStyles that could be seen in early versions of Material-3 images. Since the actual Material-3 TextTheme is available, the tinted TextTheme feature is no longer required. While the FCS tinted TextTheme did provide an alternative version of the actual tint used in Material-3, the differences were quite subtle. Additionally, recent changes in Flutter make using it very verbose and complicated. Why it does so is explained in detail below.
In Material-3 Typography 2021, the TextTheme and all styles in it are fully opaque and use onSurface as color on all TextStyles. In a seed generated ColorScheme, the text styles become primary color tinted, because the onSurface color by default has subtle primary tint. With FCS, you can modify the onSurface to black or white to avoid this, if so preferred.
In Material-2 Typography 2018 and 2014, some TextStyles in their TextThemes use partially transparent white or black colors, making them appear tinted when placed on lightly colored backgrounds. Such TextStyles also have lower contrast. If the Material-3 default text theme is used on background colors that are tinted with a color that deviates a lot in hue from the hue used as tint color by the TextTheme, it may not fit it so well. The Material-2 opacity-based text styles do not have this limitation. It is unknown why Material-3 switched to a fixed tint color instead of using the opacity-based approach used in Material-2, that is more universally usable on backgrounds with different tint colors.
In Material-3, some component themes override the default color of the default TextTheme TextStyles they use with onSurfaceVariant. This color has slightly more tint and lower contrast than the default onSurface. This is used for elements in components that should have less emphasis. Many default Material-3 components also override the color in default TextTheme TextStyles they use with ColorScheme.onSurface color, that it actually already has in a default TextTheme. These two overrides results in that whatever color the default TextTheme TextStyles have, they will be overridden by these ColorScheme colors. Resulting in that any custom-colored TextThemeand its TextStyles are not getting used by such Material-3 components and that the custom colors from the meticulously colored custom TextTheme, are rarely visible anywhere in a Material-3 application. Material-2 component themes do not do this, nor did older Flutter versions of Material-3 component themes do this.
An issue has been raised explaining the challenges this newer approach in Flutter causes when using custom colored text themes. If this issue is addressed, the tinted TextTheme feature in FCS may be brought back if it is a requested feature.
In current Flutter versions, using a custom-tinted TextTheme is rather pointless. You can, but it is not enough to define the TextTheme. You also have to pass each tinted TextStyle it has to the appropriate TextStyles in ALL component themes that override its colors, for it to have any effect. It is typically not worth the effort.
NEW
The Theme Code view panel now has a toggle that allows you to generate the configured code for the theme as input suitable for a separate app theme file. It has static getters that you can use in your MaterialApp's theme and darkTheme.
TIP: You can modify this file and e.g., pass in controller that contains user-configurable settings for theme configuration properties and generate the theme on the fly in your app. This way you can let the user configure the theme in your app, a few props anyway. This is basically what the Playground app does with all theming properties. That is why you can see the result and impact of defined theme in the Playground app itself, as you modify the desired theme configuration in the app.
The Theme Code view got a long asked for feature, Themes Playground settings export and import! You can now export your configured theme settings to a JSON file and import them back into the Playground later. This is a great way to save your theme settings for later use or to share them with others. The exported JSON file contains all the internal controller settings values you have configured in the Playground that are needed to restore a given configuration state. This Playground feature was contributed by GitHub user @akiller in !PR 257. Thank you!
The contributed feature got enhanced with more error handling and a slightly refined UI to make it production ready. It can now be tried for the first time in the 8.0.0-dev.2 release and build.
As a further enhancement of the JSON export feature, the Themes Playground app also got the ability to convert the exported settings JSON config to a shareable URL. You can now share Playground settings with other Flutter developers.
On each theme settings panel, many controls now appear in two columns to reduce the need to scroll so much on wider media and see more controls on the same screen. The layout is panel width responsive and controls will be in one column as before on smaller media.
Split the "FAB and Chip" settings panels to separate panels FAB and Chip.
Split the "BottomAppBar and SearchBar" panels to separate panels SearchBar and BottomAppBar.
On the surface Color Blends settings panel, you can choose which surface color the scaffold background color will use as its starting point surface color and as base for the blend level and mode. You can also select any ColorScheme color and use it as an override for the scaffold background color. This will override any blended color result as well as the plain white and true black settings.
The ColorScheme settings panel got five new settings:
contrastLevel property in ColorScheme.fromSeed. It is used to control the contrast level of the generated scheme colors. It will most likely land in the next stable Flutter release after 3.24. With FCS V8 you can use it already now.fixed, onFixed, fixedDim and onFixedVariant colors, when a seed generated ColorScheme is NOT being used.fixed, onFixed, fixedDim and onFixedVariant colors to the Material-3 design specified values 90, 10, 80, 30 or and or opt-in on an alternative set 92, 6, 84, 12 that have higher contrast.onPrimaryContainer, onSecondaryContainer, onTertiaryContainer and onErrorContainer have changed from tone 10 to 30 for LIGHT theme mode. This change will land in Flutter when the Material Color Utilities (MCU) package is updated to at least 0.12.0. This has not been done even in master (Sep 3, 2024).
Added customizable error colors to the custom scheme. Only available when Use Material3 error colors setting is OFF, when using the custom scheme on Input Colors and ColorScheme settings panels.
Added using error color as a seed color for error tonal palette in the ColorScheme settings panel. The tonal palette now also supports using a custom error color to generate its tonal palette.
Added error color and error container color locking to the ColorScheme settings panel.
Added code gen for custom error colors.
Added ColorScheme code generation for all the new ColorScheme colors introduced in Flutter 3.22.
Added showing the new Flutter 3.22 ColorScheme colors in the Effective Colors panel.
Added showing the new Flutter 3.22 ColorScheme colors in the ColorScheme settings panel.
Added showing the new Flutter 3.22 ColorScheme surface colors in the Color Blends settings panel.
Added support for using MCU and FSS based seed generated ColorScheme variants using FlexSchemeVariant.
Added code generation for the new MCU and FSS scheme variants.
FlexColorScheme.variant API with FlexSchemeVariant and for FSS based variants it uses FlexColorScheme.tones API with FlexSchemeVariant and its tones getter.FlexTones modifiers only show up on FSS based variants with FlexColorScheme.tones API, as they are not available when using the FlexColorScheme.variant API.Added the FFS seed option "Monochrome surfaces" introduced in package FlexSeedScheme 3.0.0.
Added an Apply ColorScheme to all Cupertino components setting to the Component Themes settings panel
cupertinoOverrideTheme: const CupertinoThemeData(applyThemeToAll: true) and generate code for it and applies the setting to the Playground app's theme as well.In the Switch, Checkbox and Radio settings panel, the Switch now has a platform adaptive theme setting for theming the Material Switch to look close to the iOS CupertinoSwitch.
On the surface Color Blends settings panel, you can now select a scheme color to use as the theme resulting Scaffold Background color. The selection is independent for light and dark theme mode.
Added separate controls and code gen for light and dark mode background color selection for the BottomAppBar on settings panel BottomAppBar.
Added divider color selection to Dialogs settings panel for the DatePicker divider color. Setting it to transparent will hide the divider in Material-3 mode, in Material-2 mode the Divider does not exist. Also added feature to allow selection of DatePicker header foreground color independently of the used background color. Previously it always used the contrast pair of the background color, which is still the default if you do not select a custom foreground color.
Added the ability to change tab alignment in the TabBar settings panel.
In the Floating Action Button settings panel, added the ability to change the foreground color of FAB to something that is not its automatic on-color pair.
To TextField settings panel, added the ability to change the focused suffix icon color. The TextField also got controls for dense input decorator and custom content padding, as well as for using a platform adaptive border radius. It also has two new pre-made design examples. In addition to selecting Material-3 default and Playground defaults, you can now also use "Colored outline" and "Dense, no focused border" as design examples or as TextField starting configuration points.
To AppBar settings panel, added the Center title setting to control if the title is centered or not. This API has been available in FCS since v6, but not offered in the Playground, now it is in the Playground too.
To the AppBar settings panel, title foreground color, leading icon and actions icon color settings were added.
The Chip settings now include separate color for the `ChoiceChip (called Suggestion Chip in M3 design). The feature that blends the selected main overall Chip color was made optional. It is a useful feature due to the limited independent theme control over the Chips.
The Chip settings panel now includes font size and padding controls.
The ListTile settings panel now includes a large number of theming controls for ListTile theming.
The SearchBar settings panel now includes theming controls for SearchBar and SearchView theming.
On the Adaptive Theming settings panel you can now also control the MaterialTapTargetSize setting.
The Segmented Buttons settings panel now includes a control for selected foreground colors for both SegmentedButton and ToggleButtons.
Added feature #224 that adds Card.filled and Card.outlined to widget showcase. They are also used in the "Card" settings" panel for card presentation.
The Playground can now also show the used color tones numbers for MCU based generated dynamic color schemes, also when they use dynamically obtained tones and when e.g., contrast level is adjusted. This feature is computationally complex and quite expensive, but we thought it was worth it to show the correct palette color tones also for DynamicScheme variants.
CHANGE
The optional staggered grid-based Playground UI was removed.
No longer generate any code for useMaterial3: true value. The FSS default is now true and we thus no longer explicitly need to add API code gen when the setting is ON.
The Introduction panel's content was updated.
The Playground defaults the replacement for useTextTheme, the useMaterial3Typography to null. This makes Material-2 and Material-3 mode use their respective mode-based typography by default. If you still make a Material-2 app, prefer using Material-3 typography and set it to true, like the Playground did before. Material-3 typography is much nicer than Material-2 typography. This is not a breaking API change, just a change in the default value used when you rest the Playground to its default values. Turn it ON in TextTheme settings, to get the same config as you did with a reset before. If you use Material-3, this Playground settings change has no impact on your theme result.
Updated the presentation of Switch, Checkboxand Radio on their settings panel.
Changed the name of the "Theme colors" settings panel to Input Colors.
Changed the name of the "Surface blends" settings panel to Color Blends.
Changed the name of the "Component Themes" settings panel to General Settings.
Changed the order of topic panels. The General Settings, Adaptive Theming and Shape Radius panels now come before the color panels.
The feature Swap secondary and tertiary legacy colors in Material-3 on the Input Colors settings panel is now OFF by default. The settings info expand explains when it is preferable to use it.
The feature Use TextField's InputDecorationTheme in picker dialogs on the "Dialog" settings panel is now OFF by default.
Modified settings panel background and header colors, as well as theme selector buttons to use suitable new ColorScheme surface theme colors, instead of computing their own shades from theme colors.
Changed surface and on-color blends to default to 0. Blends are not ON by default anymore in Playground. The feature is still very cool and useful for many different design goals.
Adjusted the code gen for surface colors setting "Main and container colors on color blending" to handle the new FlexSubThemesData.blendOnColors default being false instead of true. The Playground still by default sets blendOnColors to true for dark mode and defaults to false for light mode. This is done to mimic seed generated ColorScheme behavior, when not using seed generated colors.
Update Material-3 default info for BottomAppBar to surfaceContainer.
Improved the Chip presentation, by having them in own wraps per type and a column that names the Chip type with both Flutter and Material-3 naming
Improved IconButton presentation, by adding a text column explaining the type, as on the Chips panel.
Improved presentation of Switch, Checkbox and Radio, by using more orderly columns and spacing and explanation labels, similar style as on Chip and IconButton.
The Playground default for the TextField settings panel is still using "Outline" and filled as default, not "Underline" and filled style like Flutter SDK does. The FCS API defaults to underline, only the Playground comes with a slightly opinionated nicer default. Playground TextField default, along with FCS API, it was changed to not using color on the unfocused border, like Flutter M3 and M2 default styles do. Making both Playground and FCS API less opinionated in its default values in this case.
In General Settings, the Playground by default turns ON the settings "Use Material-2 style Divider in Material-2", "Tinted disabled components" and "Tinted interaction". Corresponding to FlexSubThemesData for useM2StyleDividerInM3, interactionEffects and tintedDisabledControls being set to true. Their FCS API defaults are however false, to keep the API itself less opinionated. Before FCS v8, these API defaults were true as stated in breaking changes. The Playground thus keeps this past, already in API opinionated defaults, as its pre-configured defaults, but the defaults for the FCS API itself, in Material-3 mode, are much less opinionated now.
In Navigation Rail panel settings, the "Labels when collapsed" defaults to "All items have labels". This means that navigationRailLabelType: NavigationRailLabelType.all is used by default in Playground generated FlexSubThemesData() passed to subThemesData, thus applying what was API default before. When you create a new theme with the Playground, you get same style as before. If you migrate from V7 you will need to set NavigationRailLabelType.all in yur old theme to get the same Rail style, if you had not defined it explicitly before.
The NavigationRail settings panel got controls for selected and unselected label size, as well as selected and unselected icon size. The panel now also has settings for collapsed and expanded rail widths and destination group alignment.
The NavigationBar settings panel got controls for selected and unselected label size, as well as selected and unselected icon size.
The BottomNavigationBar settings panel got controls for selected and unselected label size, as well as selected and unselected icon size. The BottomNavigationBar animates their size transitions as it is intended to use different sizes for selected and unselected item. The NavigationBarna dNavigationRail do not animate their item size changes, but you can still use it.
Changed how ALL opacity sliders work. They now all work with default (null) color and opacity is also nullable. If the SchemeColor it is used on is null, it will use the default color and apply opacity on it. It is no longer required to select the same color as default to apply opacity anywhere.
Major internal refactor of all Sliders used in the Playground. Converted the Sliders to custom composed SliderListTileReveal, a combo convenience widget used for Sliders with a null default value. Also having separate labels for disabled and null default values, and a built info ListTileReveal.
Changed the style and speed of all popup menus. They are more compact with smaller font, and open under the ListTile you open them from, when there is room to do so. They also have no animation to open quickly and more desktop like, as this app is intended to be used primary on desktop. Their states now communicate the default for their settings better when FCS is used, as well as when FCS is disabled.
DETAILS: The bulk of used popups components in the Playground are now using a shared a generic
EnumPopupMenu<T extends Enum>, based onListTileandPopupMenuButtonthat now supports nullable enums and has built-in support for null selection and disabled defaults. It also has built-inListTileRevealfor info expand reveals. There are still a few special case popups that have some specialized features likeColorSchemePopupMenubut it is based on the same design. It needs to be able to communicate a large number of default color values for its color default labels, depending on active theme state, so it supports things likedefaultLabel,defaultLabelDark,defaultLabelM2,defaultLabelDarkM2,defaultDisabledLabel,defaultDisabledLabelDark,defaultDisabledLabelM2anddefaultDisabledLabelDarkM2. This refactoring was also in preparation for adding more features, as it makes it easier to add enum based props. Sadly the refactor and migration of the Playground to use these components took a long time and delayed the release at least two weeks, maybe more. Some snafus in shown default value labels may also exist concerning colors, due to this refactor.
Updated the official Material-3 demo app in the Theme Simulator to a version with the same look as the latest official version. The updated version now also uses the demo's new Sliver-based cached scrolling. The version is still a fork, with some tweaks to make it work when embedded into the Playground simulator and getting its theme from the Playground and not inside the demo app. The fork also has a denser two-column layout with different breakpoints. This was done so that we in portrait mode can get two columns with a NavigationRail already on iPad Pro 11" and the expanded Rail on iPad Pro 12.9".
In the ColorScheme panel, we brought back the ColorScheme color hover that highlights its color source tone in the Tonal Palette above. This feature existed before, but started causing issues on WEB builds and was removed 16.3.2023. It has now been brought back, and we will test if it works better now. It is a nice feature to see where the color comes from in the palette.
The controls to test settings for platform adaptive responses are now hidden behind an expanding ListTile. This is used on every panel where the controls exist. It is intended to make the UI less cluttered, the controls are not used so often.
FIX
fabSchemeColor: SchemeColor.secondary selection was not generated.FlexAdaptive.setting value FlexAdaptive.appleWeb did not return AdaptiveTheme.appleWeb when selected, it returned FlexAdaptive.apple. This only impacted simulation of responsive themes for the Apple and Web response in the Playground app. Themes using this feature worked correctly.The most critical changes to migrate from FlexColorScheme V7 to V8 are listed below. For a full list of all breaking changes, see PACKAGE CHANGES and…
All changes to the FlexColorScheme (FCS) package are documented here.
Oct 14, 2024
Version 8.0.0 makes FlexColorScheme fully aligned with Flutter's MAJOR BREAKING Material-3 theming changes introduced in Flutter version 3.22. Due to Flutter 3.22 breaking many past Material styles, introducing new colors to ColorScheme and deprecating three colors, FlexColorScheme had to undergo major revision and also break many of its past styles and some older APIs.
Most APIs are still there and work as before, but a few produce results that differ slightly from past ones, just like Flutter 3.22 also does over previous versions. Generally, the upgrade should be smooth, but you may need to review the produced theme result to see that you don't get any changes that don't fit with your design goals. Some past defaults have changed in FCS V8, but previous values are still available. You will need to enable them explicitly to get the same results as before. The purpose of these default value changes is to make FCS have less opinionated defaults, and be more aligned with Flutter's Material-3 design defaults. The Themes Playground app will still have some of its own opinionated defaults, done via default settings values the app uses in its default configuration, but the package Material-3 default starting points, are now much more aligned with Flutter's Material-3 defaults.
The most critical changes to migrate from FlexColorScheme V7 to V8 are listed below. For a full list of all breaking changes, see PACKAGE CHANGES and the BREAKING part further below.
The flag useMaterial3 now defaults to true in FlexColorScheme and FlexThemeData constructors. Set it to false to explicitly use Material-2 theming. It defaulted to true before. Material-2 is still fully supported in FCS v8 and Flutter v3.24, but will eventually be deprecated in Flutter, when that happens, it will also happen in FCS.
With the Themes Playground app, you can use a pre-configured Material-3 based theme that looks very similar to legacy Material-2 design. This will continue to be available also after Material-2 is deprecated in Flutter.
The FlexSubThemesData properties interactionEffects, tintedDisabledControls, defaultUseM2StyleDividerInM3 and blendOnColors now all default to false. In previous versions they defaulted to true. If you before had not explicitly turned these properties false, they were all true by default. To get the same result as before in FCS V8, you now have to set these properties to true. This change was made to have fewer opinionated defaults in FCS to align it more with Flutter SDK default styles.
The FlexSubThemesData property navigationRailLabelType no default to NavigationRailLabelType.none. To get the same result as before by default, you will need to set it to NavigationRailLabelType.all. This change was made to have fewer opinionated defaults in FCS to align it more with Flutter SDK default styles. The Playground defaults it to NavigationRailLabelType.all by adding this by default to new default themes.
Since ColorScheme.background color was deprecated in Flutter 3.22.0 we can no longer use it as a part of surface blends and its modes. For example, when surfaceMode is set to FlexSurfaceMode.highBackgroundLowScaffold it now uses surface and dialog blends set to 2x instead of 1x, so that it represents the "high background" style as before, but done via surface color. Without this breaking change, this mode would produce the same result as FlexSurfaceMode.levelSurfacesLowScaffold and be redundant.
ColorScheme colors background, onBackground and surfaceVariant.This major release has many breaking changes forced via breaking changes in Flutter 3.22.0. Due to this, the release also uses this opportunity to clean up APIs with opinionated defaults, like the ones mentioned above. There are additional smaller and more subtle changes in defaults values, that align FCS to use the same color defaults from the new ColorScheme colors, that Flutter started using in version 3.22.0 as well. You can find all the details below in the PACKAGE CHANGES chapter.
Flutter 3.22 introduced a large number of breaking changes to the ColorScheme and default color mappings that Flutter's Material components use. In total, the Flutter 3.22.0 release adjusted 249 of its own internal tests to accommodate for new Material-3 spec changes, that all broke past Flutter Material-3 component styles. For a reference to the broken and updated tests, see this issue side comment.
FlexColorScheme V8 now allows you to use the new colors introduced in Flutter 3.22. As before, with FCS you can get fully defined hand-tuned ColorSchemes without using Material-3 design's Material Color Utilities (MCU) based seed-generated ColorSchemes. You may prefer to use seed generated ColorSchemes with Material-3, but it is nice to know you do not have to.
To the seed generated ColorSchemes, FCS adds support for all the Flutter DynamicSchemeVariant seed generated variants. It also improves them by allowing you to use separate seed colors for each palette. With Flutter's ColorScheme.fromSeed, you can only seed with one color, the primary color. The resulting ColorScheme always uses computed values for secondary and tertiary palettes, plus a hard coded fixed color for the error palette seeding. Surfaces colors are always tied to primary color as well and include a hint of primary color. With FCS, you do not have these limitations, you can seed with separate colors for each palette with even with Flutter's own dynamic scheme variants. This was always possible with FlexColorScheme and its FlexSeedScheme (FSS) based FlexTones, seed generated scheme variants. FCS now brings this feature to Flutter's own dynamic scheme variants as well.
As before, FCS also has its own even configurable FlexTones way of making seed generated ColorSchemes. Typically, you use predefined FlexTones, but you can also create your own FlexTones configurations. With it, you can define the chroma goals for each palette and define which tone is mapped to what ColorScheme color. An internal example of using them is the implementation of FlexTones modifiers.
FlexColorScheme V8 adds three new FlexTones modifiers. The most useful one is called monochromeSurfaces(). This tone modifier makes the surface shades of any used FlexTones configuration use monochrome greyscale shades for the surface and surface variant palettes. It thus gives us greyscale colors for ALL surfaces, instead of primary-tinted ones. It can be applied to any FlexTones seed generated scheme variant. The other new modifiers are expressiveOnContainer() and higherContrastFixed(). Check the API docs for more details.
TODOS BEFORE STABLE RELEASE
MINOR KNOWN ISSUES
Package: The toScheme method may need some updates for the raw FlexColorScheme? constructor to not provide surprises
toScheme works as intended with light/dark factories. This update would only be for a better raw constructor result. The raw constructor is not supposed to be used directly, so any gaps are not really that relevant.Playground: Cancelling input colors from custom theme get reset to active ColorScheme, not to input values.
COMPLETED CRITICAL CHANGES
DONE: Consider what to do with surfaceTint removal.
DONE: Consider what to do with shadows back.
DONE: Generate full ColorScheme in Themes Playground, also when not seeding. Need all "fixed" and "fixedDim" colors.
DONE: Figure out how to handle background not existing in ColorScheme; it was critical in FCS for its surface blends.
DONE: Flutter 3.22 created +2000 deprecation hints in FCS, mostly MaterialState to WidgetState related deprecations. The remaining 492 warnings were all the deprecated background, onBackground and surfaceVariant warnings.
DONE: Pass through of all new ColorScheme colors, not used directly by FCS if a ColorScheme is passed in.
DONE: In Material-3 mode, consider more breaking default value changes to clean up the past opinionated API and make it more aligned with Flutter's Material-3 defaults.
DONE: Add a large number of new theming features.
DONE: Add three new slightly different baseline monochrome schemes. Great for prototyping without color distractions, or to as baseline schemes to add custom colors to.
DONE: Add support for all the new Flutter DynamicSchemeVariant seed generated variants, with the twist that it can also use separate seed colors for each palette.
PLUS: A lot of other new features and improvements, see the full list further below.
DECIDED TO POSTPONE TO A LATER RELEASE TO GET V8 OUT THIS YEAR
FlexSubThemes but not yet added to FlexSubThemesData or the Playground app. Most of the properties will not be in the Playground app, but may be added to the package later smaller incremental updates.AppBar.
ShapeBorder configuration, including Squircle.
Divider theme features, e.g., thickness and totally custom color.Checkbox shape and border.FlexThemeModeOptionButton and FlexThemeModeSwitch that show the six main theme colors, instead of only four colors like now.FlexSubThemes.inputDecorator and FlexSubThemesData. Will not be in the Playground, only in the package.This section contains a detailed list of all changes introduced in FlexColorScheme version 8.0.0.
BREAKING CHANGES
This version contains a lot of breaking changes due to updates in the Material-3 ColorScheme in Flutter 3.22. At the same time, this release uses the forced breaking change to clean up some older APIs. FCS is now more aligned with Flutter's Material-3 theming defaults, by typically using them as starting points in the default Material-3 mode. Material-2 mode is still supported, it has its own opinionated defaults as before.
The ThemeData flag useMaterial3 is now true by default to align with Flutter 3.16.0 and later default for ThemeData. To continue using Material-2 theming, set useMaterial3 to false. All component themes in FlexSubThemes that have a useMaterial3 property now also default to true.
Removed ALL references to in Flutter 3.22 deprecated ColorScheme colors background, onBackground and surfaceVariant. They are not used in FCS anymore. The background color was critical for FCS surface blending, it is now handled differently. The removal of these ColorScheme colors had far-reaching, but typically still subtle implications on styles created by FCS. There are many breaking minor style changes in this release due to this. Here are the critical changes caused by all these breaking changes in Flutter 3.22:
background and onBackground colors in FlexColorScheme, FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light and FlexThemeData.dark factories. They are not used anymore. Use surface and onSurface colors instead.background, onBackground, surfaceVariant from FlexSchemeOnColors and FlexSchemeSurfaceColors. They are no longer used and have no function. They were deprecated since the same colors were deprecated in ColorScheme in Flutter 3.22.surfaceVariantAlpha and backgroundAlpha colors in FlexAlphaValues. They are not used anymore and have no function, use surfaceAlpha instead. They were deprecated since the colors they related to were deprecated in ColorScheme in Flutter 3.22.FlexSchemeSurfaceColors.blend factory constructor produces slightly different blend result than in earlier versions. Because Flutter 3.22 deprecated ColorScheme colors background, onBackground and surfaceVariant, that were used in the blend calculation earlier. It is no longer possible to produce the same results as before, but the results are equivalent to previous design intent. With one exception, using surfaceMode with FlexSurfaceMode.highBackgroundLowScaffold sets surface and dialog blends to 2x instead of 1x, so that it represents the "high background" style as before, but done via surface. Without this breaking change, this mode would produce the same result FlexSurfaceMode.levelSurfacesLowScaffold and be redundant.SchemeColor removed all the corresponding colors that Flutter 3.22 deprecated. This is a VERY breaking change and will break your code if you happened to use any of the removed enum values. This may likely happen. The removed enum values are: SchemeColor.background, SchemeColor.onBackground and SchemeColor.surfaceVariant. For background Flutter recommends that you should use the values SchemeColor.surface and SchemeColor.onSurface instead and for surfaceVariant the SchemeColor.surfaceContainerHighest is recommended. In all cases you can try the other new surface colors as well, to see what best fits your design goals and intent.SchemeColor got support for all the new colors in Flutter 3.22 ColorScheme. It also removed the colors Flutter 3.22 deprecated. The order of the enum values was modified. This will break usage that depends on the enum's index, for example, storage of the values for implementations that depend on the index value.systemNavBarStyle in FlexColorScheme.themedSystemNavigationBar now defaults to FlexSystemNavBarStyle.surface, instead of FlexSystemNavBarStyle.background. Using FlexSystemNavBarStyle.background results in the color Theme.of(context).colorScheme.surfaceContainerLow being used, where it previously was Theme.of(context).colorScheme.background. This is because Flutter 3.22 deprecated ColorSCheme.background.FlexAppBarStyle value background now results in the AppBar using the surfaceContainerLow color instead of background. This breaking change was introduced because of the breaking change in Material-3 in Flutter 3.22 where the color background was deprecated. The new color is kind of the best match for the old background color in a typical FCS configuration.FlexSystemNavBarStyle value background now results in the app bar using the surfaceContainerLow color instead of background. This breaking change was introduced because of the breaking change in Material-3 in Flutter 3.22 where the color background was deprecated. The new color is kind of the best match for the old background color in typical FCS configuration.Breaking rename: All helper component themes in FlexSubThemes ended with Theme, as designed, except FlexSubThemes.bottomNavigationBar. This mistake is now corrected, it was renamed to FlexSubThemes.bottomNavigationBarTheme. The old version is deprecated and passes its props through to the renamed version. The old and wrong named one will be removed in version 9.0.0.
Deprecated FlexSubThemesData.blendTextTheme, it no longer has any function. See topic "Why is blendTextTheme deprecated?" further below for more information,
Deprecated the FCS legacy property useFlutterDefaults. FlexColorScheme in Material-3 mode now defaults to using Flutter default styles. For other configurations, modify them as desired. In Material-2 mode, FCS continues to use its opinionated own defaults as before, as long as Material-2 exists.
Deprecated the static function FlexColorScheme.createPrimarySwatch, it is no longer used by FlexColorScheme internally, it is now deprecated in FlexColorScheme and will go away in V9. After this, you will still be able to find this function in ColorTools in the package flex_Color_picker, where it will remain available.
Replaced the FCS legacy property useTextTheme with a more feature correctly named property useMaterial3Typography. Use it instead. The useTextTheme originally had another function in much older versions of FCS. Its name no longer represented its function, the new name does. If not defined, the default is true in Material-3 mode and false in Material-2 mode. If you still use Material-2, try setting this to true to get nicer typography in Material-2 mode.
The color material3DarkOnErrorContainer was changed from Color(0xFFFFB4AB) to Color(0xFFFFDAD6) to match the new Material-3 default dark error color used in Flutter 3.22.
Dialog background color now defaults to surfaceContainerHigh with no elevation tint color in Material-3 mode, instead of surface with elevation tint. Breaking change introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The ElevatedButton background color now defaults to surfaceContainerLow with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The PopupMenuButton background color now defaults to surfaceContainer with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The MenuBar background color now defaults to surfaceContainer instead of surface with elevation tint in Material-3 mode. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The produced MenuTheme background color now defaults to surfaceContainer with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22. This affects default background color of the opened menu on MenuBar, MenuAnchor and DropdownMenu.
The BottomSheet background color now defaults to surfaceContainerLow with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22.
The produced DrawerTheme background color now defaults to surfaceContainerLow with no elevation tint color in Material-3 mode, instead of surface with elevation tint. This breaking change was introduced to match the breaking change in Material-3 defaults in Flutter 3.22. This affects the default background color of the Drawer and NavigationDrawer. FCS uses surfaceContainerLow as background color in Material-2 mode by default too.
The produced DrawerTheme width now defaults to 304 dp in Material-3 mode. The [official Material-3 spec is 360 dp](Material-3 spec https://m3.material.io/components/navigation-drawer/specs), FCS was using it, but Flutter SDK has so far "declined" following the Material-3 spec here and still uses the older default 304 dp used in the Material-2 spec. This older default is actually a better choice, so FCS has now opted to revert to using it as default too. For more information about this and why 304 dp is better, see Flutter issue #123380.
The FlexSubThemesData properties interactionEffects, tintedDisabledControls and defaultUseM2StyleDividerInM3 now all default to false. In previous versions they defaulted to true. This change was made to have fewer opinionated defaults in FCS to align it more with Flutter SDK default styles. If you had NOT configured these values before, they defaulted to true. You now have to set them explicitly to true to opt in and get the same results as you got before when they were not configured.
The FlexSubThemesData properties blendOnColors now defaults to false. In previous versions it defaulted to true. This change was made to have fewer opinionated defaults in FCS, to align it more with Flutter defaults. If you had NOT configured this values before, it defaulted to true. You now have to set it explicitly to true to get the same result as before, when it was not configured. Consider setting this property true in dark mode, and false in light theme mode, for a style that matches the Material-3 color design, when you are not using a seed generated ColorScheme. This setting has no effect when using a seed generated ColorScheme, as it generates blended/tinted onColors based on the seed algorithm, that overrides the effect of this setting. This setting creates a similar effect for none seeded ColorSchemes.
The FlexSubThemesData property inputSelectionHandleSchemeColor when not defined, defaults to inputDecoratorSchemeColor and if it is not defined either, the effective text selection handle color result is ColorScheme.primary, same as Flutter SDK default. In previous versions, no definitions, resulted in ThemeData.primaryColorDark being used. This was changed in preparation of Flutter's planned deprecation of primaryColorDark.
The FlexSubThemesData property inputDecoratorIsFilled now default to false when undefined, like Flutter SDK does. Set it to true to get the same style it had with previous undefined value.
The FlexSubThemesData property inputDecoratorBorderType now default to FlexInputBorderType.underline when undefined, producing same default as Flutter SDK does. Set it to FlexInputBorderType.outline to get the same style it had with previous undefined value.
The FlexSubThemesData property inputDecoratorUnfocusedBorderIsColored now default to false when undefined, like Flutter SDK does. Set it to true to get the same style it had with previous undefined value.
In FlexSubTheme.InputDecorationTheme the following properties have new breaking default values: filled default to false, borderType default to FlexInputBorderType.underline and unfocusedBorderIsColored to false.
The FlexSubThemesData properties navigationRailMutedUnselectedLabel and navigationRailMutedUnselectedIcon now default to false. In previous versions they defaulted to true. This change was made to have fewer opinionated defaults in FCS and follow Material-3 design spec by default.
The FlexSubThemesData properties navigationRailUseIndicator now defaults to null, resulting in true being used in Material-3 mode and false in Material-2 mode. In previous versions it defaulted to true. This change was made to have fewer opinionated defaults in FCS and follow Material design specs for default values. If you still use Material-2, you now have to set this to true to see the indicator. The Playground now always sets either true or false in both modes, it never leaves out the default choice in generated config code. The field is nullable, and you can now also get the M2/M3 different default styles, by not defining this property at all.
In FlexSubThemes.navigationRailTheme the properties mutedUnselectedLabel and mutedUnselectedIcon now default to false if undefined. In previous versions they defaulted to true. Property selectedLabelSchemeColor defaults to onSurface and unselectedLabelSchemeColor default to onSurfaceVariant, they were primary before. Property unselectedIconColor now defaults to onSurfaceVariant it was onSurface. Property selectedIconColor now defaults to onSecondaryContainer it was primary. Property labelType now defaults to NavigationRailLabelType.none it was NavigationRailLabelType.all.
The FlexSubThemesData properties navigationRailUnselectedLabelSchemeColor and navigationRailUnselectedIconSchemeColor now default to onSurfaceVariant (was onSurface). The onSurfaceVariant is used as on color pair default when any surface color is used as background color for the rail, if a none surface color is used as background scheme color, its contrast color pair is used as default for the labels and unselected icons. The navigationRailSelectedIconSchemeColor will if undefined, default to the contrast color pair for navigationRailIndicatorSchemeColor. These default behaviors result in less configuration in typical designs, while starting points defaults are the same as before and full configuration options are also available as before. The equivalent colors in FlexSubThemes.navigationRailTheme behave the same way.
The FlexSubThemesData properties navigationBarMutedUnselectedLabel and navigationBarMutedUnselectedIcon now default to false. In previous versions they defaulted to true. This change was made to have fewer opinionated defaults in FCS and follow Material-3 design spec by default.
In FlexSubThemes.navigationBarTheme the properties mutedUnselectedLabel and mutedUnselectedIcon now default to false if undefined. In previous versions they defaulted to true. Property selectedLabelSchemeColor defaults to onSurface and unselectedLabelSchemeColor default to onSurfaceVariant, they were primary before. Property unselectedIconColor now defaults to onSurfaceVariant it was onSurface. Property selectedIconColor now defaults to onSecondaryContainer it was primary.
The FlexSubThemesData properties navigationBarUnselectedLabelSchemeColor and navigationBarUnselectedIconSchemeColor now default to onSurfaceVariant (was onSurface). The onSurfaceVariant is used as on color pair default when any surface color is used as background color for the rail, if a none surface color is used as background scheme color, its contrast color pair is used as default for the labels and unselected icons. The navigationBarSelectedIconSchemeColor will if undefined, default to the contrast color pair for navigationBarIndicatorSchemeColor. These default behaviors result in less configuration in typical designs, while starting points defaults are the same as before and full configuration options are also available as before. The equivalent colors in FlexSubThemes.navigationBarTheme behave the same way.
The FlexSubThemesData properties bottomNavigationBarMutedUnselectedLabel and bottomNavigationBarMutedUnselectedIcon now default to null, resulting in true being used as default in Material-2 mode and false in Material-3 mode. In previous versions these properties defaulted to true in both modes. This change was made to have fewer opinionated defaults in FCS.
The FlexSubThemesData properties bottomNavigationBarUnselectedLabelSchemeColor and bottomNavigationBarUnselectedIconSchemeColor now default to onSurfaceVariant in Material-3 mode, it was onSurface, which remains the default in Material-3 mode. In Material-3 mode, the onSurfaceVariant is used as on color pair default when any surface color is used as background color for the navigation bar. If a none surface color is used as background scheme color, its contrast color pair is used as default for the labels and unselected icons, in both Material-2 and Material-3 mode. These default behaviors result in less configuration in typical designs, while starting points defaults are the same as before and full configuration options are also available as before. The equivalent colors in FlexSubThemes.bottomNavigationBar behave the same way.
The FlexSubThemesData property chipDeleteIconSchemeColor now default to SchemeColor.onSurfaceVariant. In previous versions it defaulted to SchemeColor.onSurface. Likewise in FlexSubThemes.chipTheme the property deleteIconSchemeColor now defaults to SchemeColor.onSurfaceVariant if undefined. In previous versions it defaulted to SchemeColor.onSurface. This change was made to adjust to follow updated Material-3 spec defaults.
The FlexSubThemesData property drawerUnselectedItemSchemeColor now default to SchemeColor.onSurfaceVariant, as on color pair default when any surface color is used as drawer background color. Previously it defaulted to onSurface. Likewise in FlexSubThemes.navigationDrawerTheme the property unselectedItemSchemeColor now defaults to SchemeColor.onSurfaceVariant if undefined. This was changed to use ase as Material-3 defaults.
NEW
Added three new FlexSchemes, called blackWhite, greys and sepia. They are primarily intended to be used as prototype phase color schemes that do not use colors. This can be useful for focusing on features and layout during the early development phase, keeping the discussion away from colors. The schemes can also be used as neutral baselines for custom color schemes, where only a few colors are overridden with custom colors.
The const color definition class FlexColor got 24 new color values to support monochrome greyscale colors for all new surfaces and their on colors for light and dark mode. These are used as starting colors for the new surface colors in the Flutter 3.22 updated and new Material-3 ColorScheme, when a seed generated ColorScheme is NOT used. These colors follow the naming convention lightFlexSurface___ and darkFlexSurface___, plus their on and inverse versions.
Added named bool parameter useOnSurfaceVariant that defaults to false, to FlexSubTheme.schemeColorPair() and to FlexSubTheme.onSchemeColor(), when set to true, the on color onSurfaceVariant is returned instead for onSurface for all surface colors.
Added black, white and transparent as enum values to SchemeColor. These are not ColorScheme colors, but these colors can in many theming situations be useful instead of the ColorScheme based ones.
onSurface.Added all the new surface colors in Flutter 3.22 to FlexSchemeSurfaceColors.
Added all the new on colors in Flutter 3.22 to FlexSchemeOnColors.
The FlexKeyColor class got three new properties, contrastLevel, useExpressiveOnContainerColors and useLegacyMonochromeSeedBehavior. They are used to control seed generation results.
The contrastLevel is used to control the contrast level of MCU generated scheme colors. The contrastLevel parameter indicates the contrast level between color pairs, such as primary and onPrimary. The value 0.0 is the default, standard contrast; -1.0 is the lowest; 1.0 is the highest. From the Material-3 Design guideline, the standard, medium and high contrast options correspond to values 0.0, 0.5 and 1.0 respectively.
contrastLevel property is only available when seed generating a ColorScheme using FlexSeedScheme's SeedColorScheme.fromSeeds when a scheme variant is used where its FlexSchemeVariant.value, isFlutterScheme is true. This set corresponds to all the DynamicSchemeVariants available in the Flutter SDK.contrastLevel is the same as the Flutter contrastLevel property available in ColorScheme.fromSeed. As of Sep 3, 2024, this contrastLevel is still only available in the master channel. It will land in the next Flutter stable, released after Flutter 3.24. With FCS v8 you can use it already now.
When using FSS
tonesbased seed generated schemes or avarianthaving itsFlexSchemeVariant.value,isFlutterSchemeit set tofalse, thecontrastLevelvalue is ignored. Withtonesbased schemes, the contrast level can instead be defined as desired using customFlexTonesconfigurations. There are two predefined higher contrast level tone and chroma mappings available asFlexTones.highContrastandFlexTones.ultraContrast, you can use them as they are, or as examples of how to create your own custom high contrast tone mappings.
The boolean useExpressiveOnContainerColors is used to make the light theme mode colors onPrimaryContainer, onSecondaryContainer, onTertiaryContainer and onErrorContainer more color expressive, at the cost of their contrast level and accessibility. Defaults to false if undefined.
onPrimaryContainer, onSecondaryContainer, onTertiaryContainer and onErrorContainer have changed from tone 10 to 30 for LIGHT theme mode. This change will land in Flutter when the Material Color Utilities (MCU) package is updated to at least 0.12.0. This has not been done even in master (Sep 3, 2024).useExpressiveOnContainerColors to true will make the colors use the new expressive tone. The expressive tone spec is not yet used in Flutter SDK, but is in the Material-3 design spec and also in MCU v 0.12.0. When this change lands in stable Flutter, it will be made ON by default in FCS too. You will still be able to opt out of using it. Flutter SDK and MCU will not contain such an opt-out feature.useExpressiveOnContainerColors to false. With it set to false, you will also keep this preference when the Flutter SDK defaults to using the expressive tones.The boolean useLegacyMonochromeSeedBehavior is used for enabling the legacy behavior for monochrome seed colors
useLegacyMonochromeSeedBehavior to true.false.respectMonochromeSeed in SeedColorScheme.fromSeeds in FlexSeedScheme's internal MCU fork, and sets it !useLegacyMonochromeSeedBehavior. In FSS this feature is opt-in and recommended to be used. Here, in FCS this setting is opt-out if not desired, and it is strongly recommended to use the new behavior. When using useLegacyMonochromeSeedBehavior with
When using
useLegacyMonochromeSeedBehaviorwithDynamicSchemeVariantvariantsfidelityorcontent, for some monochrome input colors they produceprimaryContainerandonPrimaryContaineras well astertiaryContainerandonTertiaryContainercolor pairs, with low contrast. Consider using some other scheme variants with monochrome seed colors. All others work well with any monochrome seed color. This is just how the MCUDynamicSchemesSchemeContentandSchemeFidelityare defined in MCU. They also produce fairly low contrast for these color pairs with very dark seed colors. This behavior with MCU'sSchemeContentandSchemeFidelitycould be fixed in FlexSeedScheme's internal MCU fork, but we want to keep the result of these schemes consistent with MCU.
Added TextStyles for FlexSubThemesData so that:
FlexSubThemes.appBarTheme uses FlexSubThemesData.appBarToolbarTextStyle for its toolbarTextStyle.FlexSubThemes.appBarTheme uses FlexSubThemesData.appBarTitleTextStyle for its titleTextStyle.FlexSubThemes.chipTheme uses FlexSubThemesData.chipLabelStyle for its labelStyle.FlexSubThemes.chipTheme uses FlexSubThemesData.chipSecondaryLabelStyle for its secondaryLabelStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerHeaderHeadlineStyle for its headerHeadlineStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerHeaderHelpStyle for its headerHelpStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerWeekdayStyle for its weekdayStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerDayStyle for its dayStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerYearStyle for its yearStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerRangePickerHeaderHeadlineStyle for its rangePickerHeaderHeadlineStyle.FlexSubThemes.datePickerTheme uses FlexSubThemesData.datePickerRangePickerHeaderHelpStyle for its rangePickerHeaderHelpStyle.FlexSubThemes.dialogTheme uses FlexSubThemesData.dialogTitleTextStyle for its titleTextStyle.FlexSubThemes.dialogTheme uses FlexSubThemesData.dialogContentTextStyle for its contentTextStyle.FlexSubThemes.floatingActionButtonTheme uses FlexSubThemesData.fabExtendedTextStyle for its extendedTextStyle.FlexSubThemes.menuButtonTheme uses FlexSubThemesData.menuButtonTextStyle for its textStyle.FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerDayPeriodTextStyle for its dayPeriodTextStyle.FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerDialTextStyle for its dialTextStyle.,FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerHelpTextStyle for its helpTextStyle.,FlexSubThemes.timePickerTheme uses FlexSubThemesData.timePickerHourMinuteTextStyle for its hourMinuteTextStyle.,FlexSubThemes.toggleButtonsTheme uses FlexSubThemesData.toggleButtonsTextStyle for its textStyle.FlexSubThemes.segmentedButtonTheme uses FlexSubThemesData.segmentedButtonTextStyle for its textStyle.FlexSubThemes.snackBarTheme uses FlexSubThemesData.snackBarContentTextStyle for its contentTextStyle.copyWith on the produced component themes. With these props you get access to direct TextStyle styling for these component properties in the FCS API too.Added useCupertinoStyle property to FlexSubThemes.switchTheme. Added switchAdaptiveCupertinoLike property to FlexSubThemesData and made FlexSubThemes.switchTheme use it.
Added secondarySelectedSchemeColor, fontSize, secondaryFontSize, iconSize and padding properties to FlexSubThemes.chipTheme. Added chipSecondarySelectedSchemeColor, chipFontSize, chipSecondaryFontSize, chipIconSize and chipPadding properties to FlexSubThemesData and made FlexSubThemes.chipTheme use them.
Added headerForegroundSchemeColor property to FlexSubThemes.datePickerTheme. Added datePickerHeaderForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.datePickerTheme use it for its header foreground color.
Added dividerSchemeColor property to FlexSubThemes.datePickerTheme. Added datePickerDividerSchemeColor property to FlexSubThemesData and made FlexSubThemes.datePickerTheme use it for its divider color.
Added isDense property to FlexSubThemes.inputDecoratorTheme. Added inputDecoratorIsDense property to FlexSubThemesData.
Added contentPadding property to FlexSubThemes.inputDecoratorTheme. Added inputDecoratorContentPadding property to FlexSubThemesData and made FlexSubThemes.inputDecoratorTheme use it.
Added inputDecoratorSuffixIconSchemeColor property to FlexSubThemes.inputDecorationTheme. Added toggleButtonsSelectedForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.segmentedButtonTheme use it.
Added adaptiveInputDecoratorRadius and inputDecoratorRadiusAdaptive properties to FlexSubThemesData. They are used to select platform(s) to an alternative border radius response for the input decorator, for the selected platform(s).
Added minWidth and minExtendedWidth to FlexSubThemes.navigationRailTheme. Added navigationRailMinWidth and navigationRailMinExtendedWidth properties to FlexSubThemesData and made FlexSubThemes.navigationRailTheme use them.
Added tabAlignment property to FlexSubThemes.tabAlignment. Added tabBarTabAlignment property to FlexSubThemesData and made FlexSubThemes.tabBarTheme use it for its. (TODO: Add a note about thrown assert, open an issue in Flutter SDK about it and suggest an alternative solution.)
Added foregroundSchemeColor property to FlexSubThemes.floatingActionButtonTheme. Added fabForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.floatingActionButtonTheme use it for its foreground color.
Added selectedForegroundSchemeColor property to FlexSubThemes.segmentedButtonTheme.
Added segmentedButtonSelectedForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.segmentedButtonTheme use it.
Added selectedForegroundSchemeColor property to FlexSubThemes.toggleButtonsTheme.
Added toggleButtonsSelectedForegroundSchemeColor property to FlexSubThemesData and made FlexSubThemes.toggleButtonsTheme use it.
Added appBarForegroundSchemeColor, appBarIconSchemeColor and appBarActionsIconSchemeColor properties to FlexSubThemesData and made FlexSubThemes.appBarTheme use it for its colors on title, icon and actions.
Added bottomAppBarHeight property to FlexSubThemesData and made FlexSubThemes.bottomAppBarTheme use it as its height value.
Added scaffoldBackgroundBaseColor property to FlexSubThemesData. It is a FlexScaffoldBaseColor enum that can be used to select the base color used as Themedata.scaffoldBackgroundColor in a theme. The selected base color is modified by used surfaceMode and blendLevel] in the FlexColorScheme's light and dark factory constructors.
Added scaffoldBackgroundSchemeColor property to FlexSubThemesData and made ThemeData.scaffoldBackgroundColor use it as an override color, if it is defined. Setting scaffoldBackgroundSchemeColor will override any blended background or true black or plain white setting.
Added cupertinoOverrideTheme to FlexColorScheme constructor and to FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light and FlexThemeData.dark factory constructors.
Added enum variant a FlexSchemeVariant to FlexColorsScheme and FlexThemeData light and dark. This is used to define the variant of the seeded ColorScheme. It is an alternative to tones that also includes scheme seed variants that Flutter SDK added in version 3.22.2.
Added enhanced enum functions data and colors to the FlexScheme enum, that returns the predefined FlexSchemeData and FlexSchemeColor respectively, that are associated with a given enum value. This could be done already using the FlexColor.schemes map. This is a convenience API to be able to use e.g. FlexColor.mango.data to get the predefined FlexSchemeData for the mango enum scheme and e.g. FlexColor.barossa.colors(Brightness.dark) to get the pre-defined dark colors used for the barossa scheme colors. See feature request: https://github.com/rydmike/flex_color_scheme/issues/210
Added ability to use custom seed key colors to FlexKeyColors.
Added support for error colors to FlexKeyColors.
Added direct color properties for errorContainer and onErrorContainer to FlexColorScheme, FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light, FlexThemeData.dark. It was required to support custom error container colors in the FlexKeyColors API.
Added Color properties primaryLightRef, secondaryLightRef and tertiaryLightRef to FlexSchemeColor.
FlexSchemeColor made for light mode in the dark mode FlexSchemeColor. This is used to create computed "fixed" and "fixedDim" colors for dark mode and the light mode ColorScheme that are identical in light and dark mode.FlexSchemeColor(), FlexSchemeColor.from(), FlexSchemeColor.effective() and FlexSchemeColor.toDark() work correctly with the new primaryLightRef, secondaryLightRef and tertiaryLightRef properties.light color properties in FlexSchemeData static FlexSchemeColor color definitions, as lightRef colors in their dark mode equivalent FlexSchemeColor. That was 156 color values to add to the 52 dark FlexSchemeColor definitions.Added fixedColorStyle to FlexColorScheme, FlexColorScheme.light, FlexColorScheme.dark, FlexThemeData.light, FlexThemeData.dark. It was required to support custom error container colors in the FlexKeyColors API. The property is an enum FlexFixedColorStyle, that allows us to choose the style of the generated "fixed" and "fixedDim" colors when not using seed generated color schemes.
Added style navigationBar to enum FlexSystemNavBarStyle that use the color for default or themed NavigationBar background color on the system navigation bar helper.
navigationBar option does not require using the edge-to-edge config required when using transparent system navigation bar to see things behind it. The transparent option sets edge-to-edge mode behind the scenes when used. This can cause some layout changes that must be considered in the app design when used. This is an optional way to style the system navigation bar to match the app's themed NavigationBar background color, without using edge-to-edge Android screen mode.Added ListTile theming support to FlexSubThemesData and made corresponding FlexSubThemes.listTileTheme properties use them in FlexColorScheme as ListTileTheme theming properties.
FlexSubThemesData properties were added: listTileSelectedSchemeColor, listTileIconSchemeColor, listTileTextSchemeColor, listTileTitleTextStyle, listTileSubtitleTextStyle, listTileLeadingAndTrailingTextStyle, listTileTileSchemeColor, listTileSelectedTileSchemeColor, listTileContentPadding, listTileHorizontalTitleGap, listTileMinVerticalPadding, listTileStyle, listTileTitleAlignment and listTileControlAffinity.Added SearchBar and SearchView theming support to FlexSubThemesData and made corresponding FlexSubThemes.searchBarTheme and FlexSubThemes.searchViewTheme properties use them in FlexColorScheme as SearchBarThemeData and SearchViewThemeData theming properties.
FlexSubThemesData properties were added: searchBarBackgroundSchemeColor, searchViewBackgroundSchemeColor, searchBarElevation, searchViewElevation, searchBarRadius, searchViewRadius, searchViewHeaderHeight, searchBarTextStyle, searchViewHeaderTextStyle, searchBarHintStyle, searchViewHeaderHintStyle, searchViewDividerColor, searchBarShadowColor, searchBarTextCapitalization, searchBarPadding, searchBarConstraints, searchViewConstraints and searchUseGlobalShape.CHANGE
Changed all internal usage of MaterialStateProperty and MaterialState to use new WidgetStateProperty and WidgetState introduced in Flutter 3.22 and later.
Static functions FlexSubThemes.schemeColor and FlexSubThemes.onSchemeColor now support the updated SchemeColor and ColorScheme.
Improved the theming logic for Card theme.
Card.outlined variant for the default case at least. This Flutter theming limitation and impact is thus now the same in FCS, as it is with vanilla Flutter ThemeData and its CardTheme. It is still broken as mentioned in the above issue, but that is a Flutter theming issue and limitation that FCS cannot fix.Changed the FlexSubThemes.inputDecoratorTheme to use only border and its WidgetState for its theme. It offers more and nicer control over hover state than using the older legacy more limited border styles. Found a related Flutter SDK issue. Using themed activeIndicatorBorder and outlineBorder do not work at all, they should work, but everything must be done via border property to get the border style, this is a bit more involved API. It is a bug in how the decorator theme is used in Flutter, only the Material-3 default themes considers and uses themed activeIndicatorBorder and outlineBorder.
FIX
Fixed #198 AppBar color issue when using seed generated scheme with key color locked.
Fixed that the Rectangular Slider value indicator did not default to primary color when undefined, as intended in FCS M2 and M3 mode. Only the Drop style indicator defaulted to primary. This came from the framework defaulting the old M2 rectangular indicator to a complex, opacity and alpha blended onSurface grey looking result.
The blendTextTheme feature was originally made before Material-3s TextTheme was available, before it was fully known how it was going to be implemented. It was an approximation of the TextStyles that could be seen in early versions of Material-3 images. Since the actual Material-3 TextTheme is available, the tinted TextTheme feature is no longer required. While the FCS tinted TextTheme did provide an alternative version of the actual tint used in Material-3, but the differences were quite subtle. Additionally, recent changes in Flutter make using it very verbose and complicated. Why it does so, is explained below.
In Material-3 Typography 2021, the TextTheme and all styles in it are fully opaque and use onSurface as color on all TextStyles. In a seed generated ColorScheme, the text becomes primary tinted, because the onSurface color by default has subtle primary tint. With FCS you can modify the onSurface to black or white to avoid this, if so preferred.
In Material-2 Typography 2018 and 2014, some TextStyles in their TextThemes use partially transparent white or black colors, making them appear tinted when placed on lightly colored backgrounds. Such TextStyles also have lower contrast. If the Material-3 default text theme is used on background colors that are tinted with a color that deviates a lot in hue from the hue used as tint color by the TextTheme, it may not fit it so well. The Material-2 opacity-based text styles do not have this limitation. It is unknown why Material-3 switched to a fixed tint color instead of using the opacity-based approach used in Material-2, that is more universally usable on backgrounds with different tint colors.
In Material-3, some component themes override the default color the of the default TextTheme TextStyles they use with onSurfaceVariant. This color has slightly more tint and lower contrast than onSurface. This is used for elements that should have less emphasis. Many default Material-3 components also override the color in default TextTheme TextStyles they use with onSurface color, that it actually already has in a default TextTheme. These two overrides causes whatever color the default TextTheme TextStyles have, to be overridden by these ColorScheme colors. Resulting in that any custom-colored TextTheme is not getting used by such Material-3 components and that the custom colors from the meticulously colored custom TextTheme, are rarely visible anywhere in a Material-3 application. Material-2 component themes do not do this, nor did older Flutter versions of Material-3 component themes do this.
An issue has been raised explaining the challenges this newer approach in Flutter causes when using custom colored text themes. If this issue is addressed, the tinted TextTheme feature in FCS may be brought back, if it is a requested feature.
In current Flutter versions, using a custom-tinted TextTheme is rather pointless. You can do it, but is not enough to just define the TextTheme. You also have to pass each tinted TextStyle it has to the appropriate TextStyles in ALL component themes that override its colors, for it to have any effect. It is typically not worth the effort.
NEW
On each theme settings panel, many controls now appear in two columns to reduce the need to scroll so much on wider media and see more controls on the same screen. The layout is panel width responsive and controls will be in one column as before on smaller media.
Split the "FAB and Chip" settings panels to separate panels FAB and Chip.
Split the "BottomAppBar and SearchBar" panels to separate panels SearchBar and BottomAppBar.
The Theme Code view panel now has a toggle that allows you to generate the configured code for the theme as input suitable for a separate app theme file. It has static getters that you can use in your MaterialApp's theme and darkTheme.
TIP: You can modify this file and e.g., pass in controller that contains user-configurable settings for theme configuration properties and generate the theme on the fly in your app. This way you can let the user configure the theme in your app, a few props anyway. This is basically what the Playground app does with all theming properties. That is why you can see the result and impact of defined theme in the Playground app itself, as you modify the desired theme configuration in the app.
On the surface Color Blends settings panel, you can choose which surface color the scaffold background color will use as its starting point surface color and as base for the blend level and mode. You can also select any ColorScheme color and use it as an override for the scaffold background color. This will override any blended color result as well as the plain white and true black settings.
The ColorScheme settings panel got five new settings:
contrastLevel property in ColorScheme.fromSeed. It is used to control the contrast level of the generated scheme colors. It will most likely land in the next stable Flutter release after 3.24. With FCS V8 you can use it already now.fixed, onFixed, fixedDim and onFixedVariant colors, when a seed generated ColorScheme is NOT being used.fixed, onFixed, fixedDim and onFixedVariant colors to the Material-3 design specified values 90, 10, 80, 30 or and or opt-in on an alternative set 92, 6, 84, 12 that have higher contrast.onPrimaryContainer, onSecondaryContainer, onTertiaryContainer and onErrorContainer have changed from tone 10 to 30 for LIGHT theme mode. This change will land in Flutter when the Material Color Utilities (MCU) package is updated to at least 0.12.0. This has not been done even in master (Sep 3, 2024).
Added customizable error colors to the custom scheme. Only available when Use Material3 error colors setting is OFF, when using the custom scheme on Input Colors and ColorScheme settings panels.
Added using error color as a seed color for error tonal palette in the ColorScheme settings panel. The tonal palette now also supports using a custom error color to generate its tonal palette.
Added error color and error container color locking to the ColorScheme settings panel.
Added code gen for custom error colors.
Added ColorScheme code generation for all the new ColorScheme colors introduced in Flutter 3.22.
Added showing the new Flutter 3.22 ColorScheme colors in the Effective Colors panel.
Added showing the new Flutter 3.22 ColorScheme colors in the ColorScheme settings panel.
Added showing the new Flutter 3.22 ColorScheme surface colors in the Color Blends settings panel.
Added support for using MCU and FSS based seed generated ColorScheme variants using FlexSchemeVariant.
Added code generation for the new MCU and FSS scheme variants.
FlexColorScheme.variant API with FlexSchemeVariant and for FSS based variants it uses FlexColorScheme.tones API with FlexSchemeVariant and its tones getter.FlexTones modifiers only show up on FSS based variants with FlexColorScheme.tones API, as they are not available when using the FlexColorScheme.variant API.Added the FFS seed option "Monochrome surfaces" introduced in package FlexSeedScheme 3.0.0.
Added an Apply ColorScheme to all Cupertino components setting to the Component Themes settings panel
cupertinoOverrideTheme: const CupertinoThemeData(applyThemeToAll: true) and generate code for it and applies the setting to the Playground app's theme as well.In the Switch, Checkbox and Radio settings panel, the Switch now has a platform adaptive theme setting for theming the Material Switch to look close to the iOS CupertinoSwitch.
On the surface Color Blends settings panel, you can now select a scheme color to use as the theme resulting Scaffold Background color. The selection is independent for light and dark theme mode.
Added separate controls and code gen for light and dark mode background color selection for the BottomAppBar on settings panel BottomAppBar.
Added divider color selection to Dialogs settings panel for the DatePicker divider color. Setting it to transparent will hide the divider in Material-3 mode, in Material-2 mode the Divider does not exist. Also added feature to allow selection of DatePicker header foreground color independently of the used background color. Previously it always used the contrast pair of the background color, which is still the default if you do not select a custom foreground color.
Added the ability to change tab alignment in the TabBar settings panel.
In the Floating Action Button settings panel, added the ability to change the foreground color of FAB to something that is not its automatic on-color pair.
To TextField settings panel, added the ability to change the focused suffix icon color. The TextField also got controls for dense input decorator and custom content padding, as well as for using a platform adaptive border radius. It also has two new pre-made design examples. In addition to selecting Material-3 default and Playground defaults, you can now also use "Colored outline" and "Dense, no focused border" as design examples or as TextField starting configuration points.
To AppBar settings panel, added the Center title setting to control if the title is centered or not. This API has been available in FCS since v6, but not offered in the Playground, now it is in the Playground too.
To the AppBar settings panel, title foreground color, leading icon and actions icon color settings were added.
The Chip settings now include separate color for the `ChoiceChip (called Suggestion Chip in M3 design). The feature that blends the selected main overall Chip color was made optional. It is a useful feature due to the limited independent theme control over the Chips.
The Chip settings panel now includes font size and padding controls.
The ListTile settings panel now includes a large number of theming controls for ListTile theming.
The SearchBar settings panel now includes theming controls for SearchBar and SearchView theming.
On the Adaptive Theming settings panel you can now also control the MaterialTapTargetSize setting.
The Segmented Buttons settings panel now includes a control for selected foreground colors for both SegmentedButton and ToggleButtons.
Added feature #224 that adds Card.filled and Card.outlined to widget showcase. They are also used in the "Card" settings" panel for card presentation.
The Playground can now also show the used color tones numbers for MCU based generated dynamic color schemes, also when they use dynamically obtained tones and when e.g., contrast level is adjusted. This feature is computationally complex and quite expensive, but we thought it was worth it to show the correct palette color tones also for DynamicScheme variants.
CHANGE
The optional staggered grid-based Playground UI was removed.
No longer generate any code for useMaterial3: true value. The FSS default is now true and we thus no longer explicitly need to add API code gen when the setting is ON.
The Introduction panel's content was updated.
The Playground defaults the replacement for useTextTheme, the useMaterial3Typography to null. This makes Material-2 and Material-3 mode use their respective mode-based typography by default. If you still make a Material-2 app, prefer using Material-3 typography and set it to true, like the Playground did before. Material-3 typography is much nicer than Material-2 typography. This is not a breaking API change, just a change in the default value used when you rest the Playground to its default values. Turn it ON in TextTheme settings, to get the same config as you did with a reset before. If you use Material-3, this Playground settings change has no impact on your theme result.
Updated the presentation of Switch, Checkboxand Radio on their settings panel.
Changed the name of the "Theme colors" settings panel to Input Colors.
Changed the name of the "Surface blends" settings panel to Color Blends.
Changed the name of the "Component Themes" settings panel to General Settings.
Changed the order of topic panels. The General Settings, Adaptive Theming and Shape Radius panels now come before the color panels.
The feature Swap secondary and tertiary legacy colors in Material-3 on the Input Colors settings panel is now OFF by default. The settings info expand explains when it is preferable to use it.
The feature Use TextField's InputDecorationTheme in picker dialogs on the "Dialog" settings panel is now OFF by default.
Modified settings panel background and header colors, as well as theme selector buttons to use suitable new ColorScheme surface theme colors, instead of computing their own shades from theme colors.
Changed surface and on-color blends to default to 0. Blends are not ON by default anymore in Playground. The feature is still very cool and useful for many different design goals.
Adjusted the code gen for surface colors setting "Main and container colors on color blending" to handle the new FlexSubThemesData.blendOnColors default being false instead of true. The Playground still by default sets blendOnColors to true for dark mode and defaults to false for light mode. This is done to mimic seed generated ColorScheme behavior, when not using seed generated colors.
Update Material-3 default info for BottomAppBar to surfaceContainer.
Improved the Chip presentation, by having them in own wraps per type and a column that names the Chip type with both Flutter and Material-3 naming
Improved IconButton presentation, by adding a text column explaining the type, as on the Chips panel.
Improved presentation of Switch, Checkbox and Radio, by using more orderly columns and spacing and explanation labels, similar style as on Chip and IconButton.
The Playground default for the TextField settings panel is still using "Outline" and filled as default, not "Underline" and filled style like Flutter SDK does. The FCS API defaults to underline, only the Playground comes with a slightly opinionated nicer default. Playground TextField default, along with FCS API was changed to not using color on the unfocused border, like Flutter M3 and M2 default style does. Making both Playground and FCS API less opinionated in its default values in this case.
In General Settings, the Playground by default turns ON the settings "Use Material-2 style Divider in Material-2", "Tinted disabled components" and "Tinted interaction". Corresponding to FlexSubThemesData for useM2StyleDividerInM3, interactionEffects and tintedDisabledControls being set to true. Their FCS API defaults are however false, to keep the API itself less opinionated. Before FCS v8, these API defaults were true as stated in breaking changes. The Playground thus keeps this past, already in API opinionated defaults, as its pre-configured defaults, but the defaults for the FCS API itself, in Material-3 mode, are much less opinionated now.
In Navigation Rail panel settings, the "Labels when collapsed" defaults to "All items have labels". This means that navigationRailLabelType: NavigationRailLabelType.all is used by default in Playground generated FlexSubThemesData() passed to subThemesData, thus applying what was API default before. When you create a new theme with the Playground, you get same style as before. If you migrate from V7 you will need to set NavigationRailLabelType.all in yur old theme to get the same Rail style, if you had not defined it explicitly before.
The NavigationRail settings panel got controls for selected and unselected label size, as well as selected and unselected icon size. The panel now also has settings for collapsed and expanded rail widths and destination group alignment.
The NavigationBar settings panel got controls for selected and unselected label size, as well as selected and unselected icon size.
The BottomNavigationBar settings panel got controls for selected and unselected label size, as well as selected and unselected icon size. The BottomNavigationBar animates their size transitions as it is intended to use different sizes for selected and unselected item. The NavigationBarna dNavigationRail do not animate their item size changes, but you can still use it.
Changed how ALL opacity sliders work. They now all work with default (null) color and opacity is also nullable. If the SchemeColor it is used on is null, it will use the default color and apply opacity on it. It is no longer required to select the same color as default to apply opacity anywhere.
Major internal refactor of all Sliders used in the Playground. Converted the Sliders to custom composed SliderListTileReveal, a combo convenience widget used for Sliders with a null default value. Also having separate labels for disabled and null default values, and a built info ListTileReveal.
Changed the style and speed of all popup menus. They are more compact with smaller font, and open under the ListTile you open them from, when there is room to do so. They also have no animation to open quickly and more desktop like, as this app is intended to be used primary on desktop. Their states now communicate the default for their settings better when FCS is used, as well as when FCS is disabled.
DETAILS: The bulk of used popups components in the Playground are now using a shared a generic
EnumPopupMenu<T extends Enum>, based onListTileandPopupMenuButtonthat now supports nullable enums and has built-in support for null selection and disabled defaults. It also has built-inListTileRevealfor info expand reveals. There are still a few special case popups that have some specialized features likeColorSchemePopupMenubut it is based on the same design. It needs to be able to communicate a large number of default color values for its color default labels, depending on active theme state, so it supports things likedefaultLabel,defaultLabelDark,defaultLabelM2,defaultLabelDarkM2,defaultDisabledLabel,defaultDisabledLabelDark,defaultDisabledLabelM2anddefaultDisabledLabelDarkM2. This refactoring was also in preparation for adding more features, as it makes it easier to add enum based props. Sadly the refactor and migration of the Playground to use these components took a long time and delayed the release at least two weeks, maybe more. Some snafus in shown default value labels may also exist concerning colors, due to this refactor.
Updated the official Material-3 demo app in the Theme Simulator to a version with the same look as the latest official version. The updated version now also uses the demo's new Sliver-based cached scrolling. The version is still a fork, with some tweaks to make it work when embedded into the Playground simulator and getting its theme from the Playground and not inside the demo app. The fork also has a denser two-column layout with different breakpoints. This was done so that we in portrait mode can get two columns with a NavigationRail already on iPad Pro 11" and the expanded Rail on iPad Pro 12.9".
In the ColorScheme panel, we brought back the ColorScheme color hover that highlights its color source tone in the Tonal Palette above. This feature existed before, but started causing issues on WEB builds and was removed 16.3.2023. It has now been brought back, and we will test if it works better now. It is a nice feature to see where the color comes from in the palette.
The controls to test settings for platform adaptive responses are now hidden behind an expanding ListTile. This is used on every panel where the controls exist. It is intended to make the UI less cluttered, the controls are not used so often.
FIX
fabSchemeColor: SchemeColor.secondary selection was not generated.FlexAdaptive.setting value FlexAdaptive.appleWeb did not return AdaptiveTheme.appleWeb when selected, it returned FlexAdaptive.apple. This only impacted simulation of responsive themes for the Apple and Web response in the Playground app. Themes using this feature worked correctly.FIX: Themes Playground: Update the in-app documentation of known Flutter issues to reflect changes brought by Flutter 3.13.
August 17, 2023
The FlexColorScheme API will then be following along with this breaking change. In this release the FlexColorScheme API useMaterial3 still defaults to…
August 16, 2023
This release uses new features in Material-3 theming that are only available in Flutter 3.13 or later. It thus requires minimum Flutter 3.13.0.
In the next Flutter stable release after 3.13, Flutter will change the ThemeData.useMaterial3 default from false to true. In other words, applications using FCS will get the Material-3 colors, text styles, and other visuals, by default. The FlexColorScheme API will then be following along with this breaking change. In this release the FlexColorScheme API useMaterial3 still defaults to false. The Themes Playground app has for quite some time already defaulted to setting the value to true. Which is also already the case in Flutter when you create a new application with flutter create.
PACKAGE
NEW
To FlexSubThemes in buttonTheme added bool alignedDropdown.
To FlexSubThemesData added bool alignedDropdown. Setting it to true improves the style of the DropdownButton and the DropdownButtonForField. They no longer expand outside the width of the parent dropdown button but are kept size aligned with it.
To FlexSubThemes in:
chipTheme added TextStyle secondaryLabelStyledialogTheme added TextStyle titleTextStyle and contentTextStylefloatingActionButtonTheme added TextStyle extendedTextStylemenuButtonTheme added TextStyle textStylesnackBarTheme added TextStyle contentTextStyletimePickerTheme added TextStyle dayPeriodTextStyle, dialTextStyle, helpTextStyle and hourMinuteTextStyletoggleButtonsTheme added TextStyle textStyleThe TextStyle additions above, to mentioned FlexSubThemes, do not yet bring any new features usable via FlexColorScheme theming APIs. They are a preparation for adding more component TextStyles to FlexSubThemesData. This in turn, will enable more direct TextStyle theming via FlexColorScheme API without using copyWith to override produced ThemeData.
As planned in previous versions, made the FlexSubThemesData.useInputDecoratorThemeInDialogs apply also to DatePickerDialog and not only to TimePickerDialog. This feature is not optimally supported by the framework. The current implementation has severe limitations. See more info in PR #128950 comment. For more information about the differences in how InputDecorationTheme behaves in different component themes, read the proposal "Make InputDecorationTheme usage in components consistent" in issue #131666.
CHANGE
FlexSubThemes.dropdownMenuTextStyle now default to TextTheme.bodyLarge if not defined. Previously it used Flutter SDK default TextTheme.bodyLarge, which is a poor design default as the style does not fit with default style bodyLarge used as default style in TextFieldin M3 mode. See issue #131350 that contains a mention of this style deviant. In Jetpack compose, the DropdownMenu and its TextField part correctly defaults to using bodyLarge, this is thus assumed to be the correct spec wise. The issue of wrong default text styles in Flutter menus is further discussed in issue #131676. FlexColorScheme will not internally correct the wrong default TextStyle on menu items, it will however change to follow the default when Flutter stable does. The difference in the DropdownMenu text input field was however significant enough to warrant a change already before the fix lands in Flutter stable.FIX
Fixed the FlexSubThemes.checkboxTheme that broke due to an unexpected breaking change in Flutter 3.13 caused by PR #125643. The breaking change is discussed further in issue #130295. The fix to the checkbox theme incorporates the new behavior to keep its custom styling working as before and expected.
Fixed useInputDecoratorThemeInDialogs not working for some properties in the InputDecorator, when the value was null or false, where some properties in the TextFields in the TimePickerDialog did not revert back to default styles. Now they do, but via hard defined values to mimic the default M3 style, as that is the only way to get back to it when a very custom themeData.inputDecoratorTheme is being used.
THEMES PLAYGROUND
NEW
The PopupMenu and Dropdowns panel got a setting for older Material-2 based DropdownButtonFormField and DropdownButton to set the new alignment property, which is an ancient theming property in the old ButtonThemeData that was used by deprecated and removed Material Buttons, but the theme is still used by these buttons.
On the TextField panel, added a feature to set the input decoration style back to FlexColorScheme's own defaults.
CHANGE
Harmonized custom color activation settings on Theme Colors and Seeded ColorScheme.
Removed old switch in custom colors in dark mode, that was used to enable using input scheme color as own seed colors in dark mode when using custom colors. For simplicity, the custom dark mode colors have been used directly as seed colors in a few releases in the Playground already. The control was an old left-over with no function anymore.
The global themed input decorator usage is now on by default for TimePickerdialog and DatePickerdialog. This is the only style currently supported for DatePickerDialog in Flutter, so it makes sense to keep it on by default. Turning it OFF for now only removes the custom, input decorator style from the TimePickerDialog. Despite the new feature in Flutter SDK, it cannot be removed from the DatePickerDialog. This is discussed in PR #128950 comment. Additional info is also available in Flutter issue #131666.
FIX
ColorScheme.secondary color and are no longer not the horrid dark mode teal color. This default color info, shown when FlexColorScheme is disabled in the Themes Playground, had not been updated for the dark M2 mode Switch, Checkbox and Radio colors.New information about Material-3 design becoming the default in Flutter SDK soon added, and that Material-2 will be deprecated.
July 20, 2023
PACKAGE
NEW
switchThumbFixedSize to FlexSubThemesData. When set to true, the Material-3 Switch themed thumb size is same size when Switch is ON and OFF. When the property value is false or undefined, it retains its default behavior and the thumb is smaller when the switch is OFF. Only has any impact in Material-3 mode.FlexAdaptive property adaptiveRemoveNavigationBarTint to FlexSubThemesData. It is used to control platform adaptive elevation tint removal on the NavigationBar theme.textSelectionTheme to FlexSubThemes, used to make a TextSelectionThemeData.inputCursorSchemeColor, inputSelectionSchemeColor, inputSelectionOpacity, and inputSelectionHandleSchemeColor, to FlexSubThemesData used to configure TextSelectionThemeData as a part of FlexColorScheme.subThemesData.adaptiveSplash a FlexAdaptive property, and the FlexSplashType values splashType and splashTypeAdaptive in FlexSubThemesData.splashFactory property, which can be used to override any splash type setting in FlexSubThemesData. This addition also removes the need to do a copy with on ThemeData to provide a custom splashFactory. Prefer using the FlexSubThemesData properties splashType and splashTypeAdaptive to control the selection of used ink factory together with adaptiveSplash, unless you have written a custom ink factory that you want to use, in which case using the splashFactory override is appropriate.adaptiveDialogRadius a FlexAdaptive property and double dialogRadiusAdaptive in FlexSubThemesData.FlexSubThemesData.tintedDisabledControls is true to FilledButton and FilledButton.tonal. They have the same disabled style when not tinted, so we can do the same to their tinted variants. Even if we still cannot theme them to have different themed colors when enabled, due to issue #118063, we can still theme their disabled state with tint when the option is used.FlexSubThemesData.tintedDisabledControls is true to IconButton, IconButton.filled, IconButton.filledTonal and IconButton.outlined foreground colors. They have the same disabled foreground style when not tinted, so we can do the same to their tinted foreground color variants. We still cannot theme them to have different themed background colors when disabled, or at all when enabled, due to issue #118063. We can only theme their disabled foreground color state with tint when the option is used.CHANGE
Updated to use version 1.4.0 of FlexSeedScheme offering two new FlexTones and extended tonal palette.
Minor style breaking changes:
Removed elevation tint impact of general FlexSubThemesData.adaptiveRemoveElevationTint setting, from the NavigationBar component. It instead has its own setting in FlexSubThemesData.adaptiveRemoveNavigationBarTint, that can be used independently of the general tint removal setting. This was done since it may be preferred to not remove the elevation tint from the NavigationBar, even when otherwise doing so on selected platforms.
In M2 mode, when not using sub-theme, ThemeData.textSelectionTheme it now gets a default TextSelectionThemeData() and its themed style defaults to SDK defaults. Enable and use sub-themes and its new theming features to style it further.
Theme.of(context).primaryColorDark, even when sub-themes where not enabled. They still do by default, but only when sub-themes are enabled.In both M2 and M3 mode bottomNavigationBarElevation in FlexSubThemesData and elevation in FlexSubThemes.bottomNavigationBar when undefined, now default to elevation 3, giving the BottomNavigationBar a default elevation of 3 when using FlexColorScheme.
NavigationBar in M3 mode, so that the bottom navigators share same default elevation when using FlexColorScheme. As before, you can adjust the elevation as needed with the API and in the Themes Playground.In M2 mode navigationBarElevation in FlexSubThemesData and elevation in FlexSubThemes.navigationBarTheme when undefined, now default to elevation 3, giving the NavigationBar a default elevation of 3 in M2 mode when using FlexColorScheme.
NavigationBar in M3 mode, so that the bottom navigators share same default elevation when using FlexColorScheme. As before, you can adjust the elevation as needed with the API and in the Themes Playground.In M2 mode, bottomAppBarElevation when undefined, now also remains undefined in FlexSubThemes.bottomAppBarTheme causing default elevation in M2 mode to become 8 like in the SDK default for M2.
AppBar, when bottomAppBarElevation was undefined, or 0 if AppBar's elevation was also undefined. The rationale for removal of this default behavior is to start cleaning out opinionated behavior that no longer makes sense to keep around, especially since eventually M2 mode is going away in Flutter.In M2 mode, ElevatedButton, FilledButton, FilledButton.tonal, OutlinedButton, TextButton and ToggleButtons now default to border radius 40 dp. Previously they defaulted to 20 dp. Their style is intended to match the used Stadium border design in M3, which is still the default in M3 mode. When using very tall buttons, the 20 dp default value was not enough to keep the buttons looking Stadium shaped as intended in FCS M2 mode.
FIX
TextSelectionThemeData did not automatically use colors that matched and followed subThemes.inputDecoratorSchemeColor when it was modified and text selection colors were not explicitly defined. The text selection, cursor and text selection handles should follow the input decoration's base color by default when they are not defined separately. Defining text selection colors was not possible before version 7.2.0, but defining input decoration colors was, but text selection remained using primary. Now they by default follow the input decoration color, but can also be separately defined via new features in version 7.2.0.
primary color. So on iOS their themed color is always colorScheme.primary. The text selection color and cursor color do follow the theme also on iOS.useFlutterDefaults when elevation is null in FlexSubThemes.bottomNavigationBar not using Flutter SDK default elevation of 8.AppBar animate when it changes. Based on Material spec and observed native Android behavior and compose behavior, the AppBar color change when it is scrolled under should animate. Flutter M3 apps do not do this, the color change is instant. Discovered a theme workaround that makes it animate. This is now always used in FCS themes until Flutter includes its own fix for it.FlexSubThemes.menuButtonTheme and the MenuButtonThemeData it makes, got a style value, where ButtonStyle.animationDuration is always Duration.zero. This solved the issue reported in issue #123615. Consequently, there is no need for a fix for the issue, since it could be solved with a theme property.THEMES PLAYGROUND
NEW
Switch got a setting to control if thumb is fixed sized or not.NavigationBar got its own setting for elevation tint removal in light and dark mode.VisualDensity.adaptivePlatformDensity, FlexColorScheme.comfortablePlatformDensity or default undefined value, that falls back to VisualDensity.adaptivePlatformDensity, are used.FlexTones.candyPop and FlexTones.chroma.IconButton styles.CHANGE
FIX
BottomNavigationBar and NavigationBar when useFlutterDefaults is true (ON).NavigationBar when default undefined background color is used.POSTPONED
SubThemes ElevatedButton in M3 mode, when using elevatedButtonSecondarySchemeColor and there was no value defined on elevatedButtonSchemeColor it resu
May 17, 2023
PACKAGE
FIX
elevatedButtonSecondarySchemeColor and there was no value defined on elevatedButtonSchemeColor it resulted in wrong color being used as default for elevatedButtonSchemeColor. Issue and test fixed.CHORE
Fixed regression issue where custom a textTheme's color is no longer applied.
May 15, 2023
PACKAGE
FIX
textTheme's color is no longer applied.
GoogleFonts and its TextTheme, like GoogleFonts.notoSansTextTheme() is used in textTheme or primaryTextTheme in FlexColorScheme.GoogleFonts and its textTheme color always defaults to the color from M2 mode default light mode ThemeData.light().textTheme. This when used in ThemeData forces users to assign correct M2/M3 color and textTheme/primaryTextTheme contrast color, to all its styles, whenever used in a situation where the default is light theme mode M2 color is the wrong color. The default contrast color is basically only correct for a light theme when using Material 2. For anything else, it is incorrect.TextTheme.TextTheme in FlexColorScheme and also allows making custom colored text custom text themes.GoogleFonts, should just keep the font color default as null, and let Flutter's default Theme behavior handle the assignment of correct color for the M2/M3 mode and light/dark theme mode, using each mode's default contrast color, for each style in the TextTheme. See issue GoogleFonts #401 for more info on this.GoogleFonts default TextTheme being used and nulling its colors, so they get correct M2/M3 mode default contrast colors in both light and dark mode and for both textTheme and primaryTextTheme.THEMES PLAYGROUND
FIX
useTextTheme setting to always generate code for setting's value in Playground code gen when it is not null. When it is undefined or null, it means that the TextTheme follows the M2/M3 specification mode default TextTheme and Typography. In previous versions, the code setting for useTextTheme only showed up in the generated code when it was needed to produce the viewed end result. If the M2/m3 mode default produced the same result, the setting was not added to the generated API config. This may be confusing. It is clearer to always show it in code gen when it is set to a none null value. See discussion in repo Q&A #150.FlexColorScheme v7.1.0 supports new theming features in Flutter 3.10, it thus requires minimum Flutter 3.10 and Dart 3.0.
May 12, 2023
FlexColorScheme v7.1.0 supports new theming features in Flutter 3.10, it thus requires minimum Flutter 3.10 and Dart 3.0.
NEW
BottomAppBar and BottomSheet.datePickerTheme to FlexSubThemes.datePickerDialogRadius and datePickerHeaderBackgroundSchemeColor to FlexSubThemesData.CHANGE
flex_seed_scheme ^1.3.0. This version, no longer depends on material_color_utilities, thus avoiding all version issues and conflicts when Flutter changes what breaking version of material_color_utilities it uses on different channels and versions.THEMES PLAYGROUND
NEW
UPDATE
ListenableBuilder instead of AnimatedBuilder where appropriate.This beta-1 of FlexColorScheme v7.1.0. It is a dev release using Flutter 3.10 beta channel. It requires Flutter version 3.10.0-1.3.pre or later. This
Apr 24, 2023
This beta-1 of FlexColorScheme v7.1.0. It is a dev release using Flutter 3.10 beta channel. It requires Flutter version 3.10.0-1.3.pre or later. This beta version is a first preparation version of FlexColorScheme for the next stable Flutter release after version 3.7.x.
NEW
datePickerTheme to FlexSubThemes.datePickerDialogRadius and datePickerHeaderBackgroundSchemeColor to FlexSubThemesData.THEMES PLAYGROUND
NEW
UPDATE
SKIA
Fix: #143 Glitches in highlighting effect on mouse hover over FlexThemeModeSwitch and FlexThemeModeOptionButton.
Apr 29, 2023
FlexThemeModeSwitch and FlexThemeModeOptionButton.FIX: AppBar setting for using platform adaptive scroll under elevation tint removal was not working correctly. UI bug in Playground only, no package i
Apr 22, 2023
Fix #136 default background color regression on FlexThemeModeSwitch and FlexThemeModeOptionButton.
Apr 19, 2023
FlexThemeModeSwitch and FlexThemeModeOptionButton.Chore: Changed to using flex_seed_scheme: ^1.2.4 that depends on material_color_utilities with version constraint set to >=0.2.0 <0.4.0 from ^0.2.0.
Apr 16, 2023
flex_seed_scheme: ^1.2.4 that depends on material_color_utilities with version constraint set to >=0.2.0 <0.4.0 from ^0.2.0.
Revised media size breakpoints.
Apr 6, 2023
Apr 6, 2023
This is a major update to the FlexColorScheme package and a substantial leap for the companion app Themes Playground. For a detailed list of all chang
Apr 2, 2023
This is a major update to the FlexColorScheme package and a substantial leap for the companion app Themes Playground. For a detailed list of all changes, please refer to the incremental log from its development release linked below.
Changes from 7.0.0-dev.3 to 7.0.0
The Themes Playground app built for this release is unfortunately not a SKIA renderer build, it is using the HTML renderer. This makes it less performant than the app would otherwise be. Additionally, scaled content, like the Themes Simulator panel in the Playground, is also fuzzier than it would be with the SKIA renderer. Due to an issue in Flutter stable 3.7.0 to at least 3.7.9, builds made with the SKIA renderer performs very poorly and crash quickly. For more information, see Flutter issue #122189. A new build using the same package version will be made later and released when a fix for the SKIA issues are available on the Flutter stable channel.
One column per quarter.