New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 7-3-0 #180
Merged
Merged
Version 7-3-0 #180
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rge` if not defined.
- Harmonize custom colors actions on theme colors and seeded - Remove not used switch in seeded dark custom theme.
Update tests. Playground: TextField reset to FCS defaults
…nfo for Switch, Checkbox and Radio
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #180 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 17
Lines 4871 4947 +76
=========================================
+ Hits 4871 4947 +76
Continue to review full report in Codecov by Sentry.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 fromfalse
to true. In other words, applications using FCS will get the Material-3 colors, text styles, and other visuals, by default. TheFlexColorScheme
API will then be following along with this breaking change. In this release theFlexColorScheme
APIuseMaterial3
still defaults tofalse
. The Themes Playground app has for quite some time already defaulted to setting the value totrue
. Which is also already the case in Flutter when you create a new application withflutter 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
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
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.