Version 7.3.0
7.3.0
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
inbuttonTheme
added boolalignedDropdown
. -
To
FlexSubThemesData
added boolalignedDropdown
. Setting it to true improves the style of theDropdownButton
and theDropdownButtonForField
. They no longer expand outside the width of the parent dropdown button but are kept size aligned with it. -
To
FlexSubThemes
in:chipTheme
added TextStylesecondaryLabelStyle
dialogTheme
added TextStyletitleTextStyle
andcontentTextStyle
floatingActionButtonTheme
added TextStyleextendedTextStyle
menuButtonTheme
added TextStyletextStyle
snackBarTheme
added TextStylecontentTextStyle
timePickerTheme
added TextStyledayPeriodTextStyle
,dialTextStyle
,helpTextStyle
andhourMinuteTextStyle
toggleButtonsTheme
added TextStyletextStyle
-
The
TextStyle
additions above, to mentionedFlexSubThemes
, do not yet bring any new features usable viaFlexColorScheme
theming APIs. They are a preparation for adding more componentTextStyles
toFlexSubThemesData
. This in turn, will enable more directTextStyle
theming viaFlexColorScheme
API without usingcopyWith
to override producedThemeData
. -
As planned in previous versions, made the
FlexSubThemesData.useInputDecoratorThemeInDialogs
apply also toDatePickerDialog
and not only toTimePickerDialog
. 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 howInputDecorationTheme
behaves in different component themes, read the proposal "Make InputDecorationTheme usage in components consistent" in issue #131666.
CHANGE
- Minor style breaking changes:
FlexSubThemes.dropdownMenuTextStyle
now default toTextTheme.bodyLarge
if not defined. Previously it used Flutter SDK defaultTextTheme.bodyLarge
, which is a poor design default as the style does not fit with default stylebodyLarge
used as default style inTextField
in M3 mode. See issue #131350 that contains a mention of this style deviant. In Jetpack compose, theDropdownMenu
and itsTextField
part correctly defaults to usingbodyLarge
, 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 defaultTextStyle
on menu items, it will however change to follow the default when Flutter stable does. The difference in theDropdownMenu
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 theInputDecorator
, when the value was null orfalse
, where some properties in theTextField
s in theTimePickerDialog
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 customthemeData.inputDecoratorTheme
is being used.
THEMES PLAYGROUND
NEW
-
The PopupMenu and Dropdowns panel got a setting for older Material-2 based
DropdownButtonFormField
andDropdownButton
to set the new alignment property, which is an ancient theming property in the oldButtonThemeData
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
andDatePickerdialog
. This is the only style currently supported forDatePickerDialog
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 theTimePickerDialog
. Despite the new feature in Flutter SDK, it cannot be removed from theDatePickerDialog
. This is discussed in PR #128950 comment. Additional info is also available in Flutter issue #131666.
FIX
- Fixed the old default color info for the toggles Switch, Checkbox and Radio, that are shown when FlexColorScheme is disabled as default values in Material 2 dark mode. They have been updated in Flutter SDK to
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.