Version 7.0.0-dev.3 #119
Closed
rydmike
announced in
Announcements
Replies: 1 comment
-
|
For a cool tweet thread about the release check this out |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
7.0.0-dev.3
Mar 18, 2023
This is the final beta v7 release before stable v7. There will be no new features or API changes in the FlexColorScheme package from this version to stable version 7.0.0. The only changes to stable will be potential bug fixes, typo corrections, API doc comment improvements and adding more tests.
The companion app Themes Playground, may get label improvements plus spelling and grammar corrections. Layouts in it may also be modified and improved as needed. It will not get any new features, but it may of course receive bug fixes.
The Themes Playground app built for this beta 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.7), builds made with the SKIA renderer performs very poorly and crashes quite quickly. For more information see Flutter issue #122189. Hopefully, before the stable v7.0.0 release, a fix will be available. If not, a new build using the same package version will be made later and released when a fix is available.
FIX
Fixed bug in legacy theme secondary and tertiary color swapping when using seed generated ColorScheme. In dark mode, combining legacy swapping and seed generation did not swap secondary and tertiary colors for schemes where it should do so. This is now fixed. If seed generation was not used, the swapping worked correctly in dark mode. In light mode it worked correctly also when seed generated schemes were used. The
swapLegacyOnMaterial3feature was introduced in version 6.1.0, it has had this bug for this case since it was introduced.Fixed bug where
FlexSubThemes.drawerThemewas usingBorderRadiusDirectional.horizontalwithendradius instead ofstartradius as itsendShape. This bug was introduced by version 7.0.0-dev.1 and has not been in any stable version.The
FlexThemeModeOptionButtonnow correctly displays itshoverColor, previously it was obscured by the colored boxes inside it.The systemNavigationBarDividerColor issue #100027 in Flutter that in FCS v5 forced removing support for divider on the system navigation bar in Android, that was available via
FlexColorScheme.themedSystemNavigationBarhas been fixed. The issue could no longer be observed on Android versions 8 to 13 on Flutter 3.7.7 stable. The divider has been enabled again, and its test setting is also available in the Themes Playground app again. The extraSystemUiOverlayStylecall used as a work-around, for the same issue to fix an issue with Android 11, has also been removed, since the workaround was no longer needed.Fixed a bug where when passing in a custom
textThemeorprimaryTextTheme, instead of defining text theme viafontFamily, that FCS tinted text feature, viasubThemesData.blendTextTheme, was not being correctly applied to the custom text themes. This is now fixed. IfsubThemesData.blendTextThemeis not being used, then the used Typography, either viasubThemesData.useTextTheme, or by using a customFlexColorScheme.typographyoverride, always gets correct brightness for bothtextThemeandprimaryTextTheme, regardless of brightness on passed in text themes. They also get the used Typography appropriate opacities on their text styles. In practice, this means that M2 style 2018 typography has opacity on some text styles, while M3 style 2021 typography, is fully opaque for all text styles.NEW
Add:
drawerIndicatorOpacitytoFlexSubThemesData.It controls the
indicatorOpacityproperty in theFlexSubThemes.navigationDrawerThemeused to customize the opacity of used color on theNavigationDrawerindicator.Add:
segmentedButtonUnselectedForegroundSchemeColortoFlexSubThemesData.It controls the
unselectedForegroundSchemeColorproperty in the newFlexSubThemes.segmentedButtonThemeused to customize theSegmentedButton.Add:
usedColorsvalue 7.In
FlexColorSchemeandFlexThemeDatalight/dark constructors, theusedColorsnow accepts value 7. When used, theprimary,secondaryandtertiarycolors in the used input scheme, are used as defined, butprimaryContainer,secondaryContainerandtertiaryContainerare computed. This is FlexColorScheme's own more Material2 version of seed generation of the container colors by using their main colors as input colors.Add:
bottomAppBarTheme,menuBarThemeandmenuButtonThemetoFlexSubThemes.Add:
inputDecoratorPrefixIconSchemeColor,drawerWidth,drawerIndicatorWidth,drawerIndicatorRadius,drawerIndicatorSchemeColor,navigationBarIndicatorRadius,navigationRailIndicatorRadius,menuBarRadius,menuBarElevation,menuBarShadowColor,snackBarActionSchemeColorandbottomAppBarSchemeColortoFlexSubThemesData.Add:
menuRadius,menuElevation,menuOpacity,menuSchemeColoranddropdownMenuTextStyletoFlexSubThemesData.Add:
drawerSelectedItemSchemeColor,drawerUnselectedItemSchemeColor,tabBarIndicatorSize, andtabBarDividerColortoFlexSubThemesData.Add: Static helper function
onSchemeColortoFlexSubThemes.Add: To
FlexThemeModeOptionButtonadded propertiessemanticLabel,focusColorandsetFocusOnTap. IfsetFocusOnTapis set to true, the button will request focus when it is tapped. Display of previously not shown hover and focus effects where fixed, they now correctly usehoverColorand the newfocusColor.Add: Property
snackBarRadiustoFlexSubThemesData, it controls the border radius viaFlexSubThemes.snackBarThemeby using itsradiusproperty.shapeindependently forSnackBarwith differentbehaviorflutter/flutter#108539Add: Properties
tabBarUnselectedItemSchemeColor,tabBarUnselectedItemOpacity,tabBarIndicatorWeightandtabBarIndicatorTopRadiustoFlexSubThemesData.Add: New configuration class
FlexAdaptiveused to configure on which platforms adaptive theming features are used. Including 100% unit test coverage for the new class.Add: Four new
FlexSubThemesDataproperties that uses theFlexAdaptiveconfiguration class, to configure the featuresadaptiveRemoveElevationTint,adaptiveElevationShadowsBack,adaptiveAppBarScrollUnderOffandadaptiveRadius. TheadaptiveRadiuscontrols if thedefaultRadiusAdaptiveis used as value for effective global border radius instead ofdefaultRadius.Add: Seven new
FlexSubThemesDatapropertiesmenuBarBackgroundSchemeColor,menuPadding,menuItemBackgroundSchemeColor,menuItemForegroundSchemeColor,menuIndicatorBackgroundSchemeColor,menuIndicatorForegroundSchemeColorandmenuIndicatorRadius.Add: Boolean property
useInputDecoratorThemeInDialogstoFlexSubThemesData. Used to control if the application's themed input decoration is used or not, on time picker dialog theme text input fields. If not used, the time picker dialog uses null as input to its input decorator, in order to get the Flutter time picker default style. This toggle will also be used on date picker when/if it gets supported.CHANGE
Style breaking:
FlexSubThemes.blendTextThemedefaults to false.In FCS before version 7, the default for
blendTextThemeinFlexSubThemeswas true, and blended text themes were used by default. Going forward if you want it, and also if you had not defined earlier and do not want to break your apps past style, setblendTextThemeto true.Style breaking:
Cardelevation default 1 dp.The
Cardopinionated sub-theme now defaults to null elevation, resulting in same default of 1 dp elevation as Flutter SDK in both M2 and M3 mode. Previously, FCS defaulted to elevation 0 dp onCardswhen opting in on sub-themes.Style breaking:
ColorScheme.outlineandColorScheme.outlineVariant.The FCS built-in computed none seeded values for
ColorScheme.outlineandColorScheme.outlineVariantwere modified. The new values are more in line with what you get with the M3 default seed algorithm, but plain grey-scale variants of them without any primary color blend. Technically light mode color foroutlinewas changed from 30% lighten of light modeonBackgroundcolor to 45%, andoutlineVariantfrom 60% lighten ofonBackgroundto 75%. Likewise for the dark mode, but with darkening of theonBackgroundwith the same percentage changes. The new values match the M3 design intent better.Style breaking:
lightSurfaceVariantanddarkSurfaceVariant.FCS v7 introduces
FlexColor.lightSurfaceVariantandFlexColor.darkSurfaceVariantcolors that are used when making none-seeded ColorSchemes. The colors are plain not tinted light and greys, matching the grey level of the tinted versions you get with seed-generated M3 colors. The colors are used as defaults for light and darksurfaceVariantcolor in none-seeded versions of generated FlexColorScheme color schemes. In previous versionssurfaceVariantwas just white and black in light and dark theme mode. To be able to better match the M3 color system, without using seed generation, this surface color should not be just white or black. The newsurfaceVariantcorrects this past design to improve compatibility with the M3 color system when not using seed generated color schemes.Style breaking:
NavigationBarChanged the default
NavigationBarheight from 62 dp to 80 dp. The 80 dp height is also the M3 spec default height for a Material 3NavigationBarin Flutter. This makes the FCS defaultNavigationBartheme less opinionated compared to M3 spec. The FCS default background color is now usingsurfaceVariantin M2 mode, and defaults in M3 to its specsurfacewith elevation tint. The FCS M2surfaceVariantdefault makes it look a bit more like the M3 mode surface with elevation tint. Especially if you use a seed-generated ColorScheme or FCS surface blends. This makes the FCS difference in style between M2 and M3 mode less than before. Since M2 does not support surface tint, it cannot match it exactly.NavigationBarfrom M3 default value of 80 dp, the ink level moves up or down with same amount as the deviation from the default 80 dp height. See issue report and illustration here FCS #114 as well as in Flutter SDK issue #117420. The issue is caused by a regression in Flutter 3.7.0 and 3.7.1. It does not exist in Flutter 3.3 and earlier. It is also fixed in the current master channel via PR 117473. This fix has now been cherry-picked (CP) via # 119553. This fix landed in Flutter hot-fix 3.7.2. To avoid the bug, upgrade to Flutter 3.7.2 or later.Style breaking: All component themes have null properties in M3 mode.
When enabling Material 3 and not enabling FCS sub-themes, and if no direct properties in FlexColorScheme raw constructor, or its light and dark factories are set in a way that requires creating a sub-theme to deliver the result, FlexColorScheme no longer creates any component sub-themes with none-null properties in Material 3 mode. In previous versions, it did so in a few cases. This is no longer required to deliver a nice starting point M3 theme, thanks to M3 now being almost fully supported in Flutter 3.7. When using FlexColorScheme with
useMaterial3set to true and its other properties at default values, and not enabling sub-themes, all component sub-themes will have null by default properties in FCS, just like in plainThemeData. When using Material 2, FlexColorScheme as before even when not enabling sub-themes, still creates core component themes listed under core default in the documentation. This is done for FCS legacy reasons, and to be able to deliver the default slightly opinionated M2 style it had before component sub-themes were a part of its offering.Impact: The impact of this style breaking change is only visible on the Material 2 type
BottomNavigationBarin dark mode. When using the M3 mode, its dark mode icons have changed to the Flutter default style. When you opt in on FCS sub-themes in the M3 mode, it gets the same icon color as before, like it still gets in the M2 FCS style, with or without sub-themes enabled. Since theBottomNavigationBaris a Material 2 component, this should be less relevant in the M3 mode. With component themes on, it looks as before.Note: Later when
theme.scaffoldBackgroundColorand maybe also some other colors in currentThemeDataare deprecated, FlexColorscheme will need to set those colors in their own sub-theme, also in M3 mode to be able to continue to deliver e.g. surface blends that impacts the scaffold background color separately from ColorScheme colors. Currently, it does this viatheme.scaffoldBackgroundColorwithout using a component theme.Style breaking: The
SnackBaraction button defaults toinversePrimary.The
SnackBartheming got propertysnackBarActionSchemeColorinFlexSubThemes. It defaults to M3 defaultinversePrimary. Earlier FCS used its foreground color with alpha 0xDD for the action button text color. Flutter's M2 defaults are poor designs and not very usable, but new Flutter M3 defaults are fine. As before, FCS uses a custom default style to fix M2 when using sub-themes. The M3 mode default is also opinionated, to make it match M3 defaults, setFlexSubThemes.snackBarBackgroundSchemeColortoSchemeColor.inverseSurface. By default, it uses the same style as its opinionated M2 style, which isonSurfacealpha blended with primary and opacity, both alpha blend and opacity are different in light and dark theme mode. This was kept as the default also in M3 mode, so it can be used as an option there as well. If you want the pure M3 style, selectinverseSurfaceinstead. This part of the style is same as before so not style breaking, onlySnackBaraction button got a new default text color, that can be themed to anyColorSchemebased color.Style breaking: Tinted TextTheme was made less obviously tinted. M3-seeded ColorSchemes brings color tint to themes, if then also using tinted text, via the optional tinted TextTheme, is becomes too much. It is now more subtle and more usable also with seeded ColorSchemes. The changes are:
Style breaking: FlexColorSchemes own algorithm to compute light and dark theme container colors from their main colors, was modified to align better with expectation by the M3 color system. The changes are:
Style breaking: The border radius on
ToolTip,PopupMenuButton,DropDownMenuandMenuno longer follow the global override fordefaultRadius. These items should generally not be themed together with a large general radius override. They can still be modified individually.API default value breaking: The
unselectedIsColoredparameters inFlexSubThemesfunctionsswitchTheme,checkboxThemeandradioThemewas changed to be nullable and to default tofalseif not defined. Previously, they were not nullable and defaulted totrue. If you have not used theseFlexSubThemesfunctions directly, typically they are not used directly, then this change has no impact on resulting themes, sinceFlexSubThemedata.unselectedToggleIsColoreddefaulted tofalseearlier as well, and set these sub-theme values to false by default, or true when so defined.Label value breaking: The
FlexColor.materialBaselineNamename string was changed from 'M3 baseline' to 'Material 3 purple'.Label value breaking: The
FlexColor.materialBaselineDescriptiondescription string was changed from 'Material guide 3 baseline based theme' to 'Material 3 guide and default purple theme'.Style breaking: The boolean
FlexSubThemesData.interactionEffectsnow correctly control if color-tinted interaction effects for hover, focus, highlight, pressed and splash are used. The setting affects both M2 and M3 mode, and all in FCS covered component themes, to the extent that the Flutter SDK supports changing their interaction effects. All components have new tinted interaction effects, that are used when setting this property to true. When it is false, all components use Flutter SDK default grey styles.Style breaking: In Material 2 mode the
InputDecorator's border radius default value was changed from 16 to 10, to be less rounded by default.Style breaking: The boolean
FlexSubThemesData.tintedDisabledControlsnow correctly control if color-tinted disabled widgets are used. The setting affects both M2 and M3 mode, and all in FCS covered component themes, to the extent that the Flutter SDK supports changing their disabled color. All components have new tinted disabled styles, that are used when setting this property to true. When it is false, all components use Flutter SDK default disabled grey styles.Style breaking: The
ToggleButtonstheme has a slightly changed style in both M2 and M3 mode. It now also correctly reacts toFlexSubThemesData.interactionEffectsandFlexSubThemesData.tintedDisabledControls. The slight change of past theme was needed to support this.Minor style breaking: The FlexColorScheme
TimePickerdialog style in M3 mode was changed. It is now styled closer to the Material 3 specification. It is also closer to correct M3 style than Flutter is in version 3.7. When Flutter fully supportsTimePickerM3 theming in the stable channel, FCS will use its native styling as its default too.API breaking: In
FlexSubThemesthefloatingActionButtonThemeandtimePickerThemenow require thecolorScheme, previously it was optional in both. Unless you have usedFlexSubThemes.floatingActionButtonThemeorFlexSubThemes.timePickerThemedirectly as helpers to make custom component themes with them, and not as typically used viaFlexSubThemesData, you will not notice this breaking API change.API default value breaking: The
FlexSubThemesDatapropertyuseTextTheme, is now nullable and defaults to null. Previously it was not nullable and defaulted to false. As before, this boolean toggle determines if the Material 3 TextTheme and Typography is used.Typography.material2021.ThemeData.useMaterial3is true, thenuseTextThemedefaults to true andTypography.material2021is used.ThemeData.useMaterial3is false, thenuseTextThemedefaults to false, andTypography.material2018is used.Typography.material2021in Material 2 mode, and for usingTypography.material2018in Material 3 mode.ThemeData.useMaterial3is false and sub themes are not used, the default typography isTypography.material2018. Note that if FlexColorScheme is not used at all, and yourThemeDatahasThemeData.useMaterial3set to false, then Flutter defaults to using obsoleteTypography.material2014. In such a case, consider defining your typography manually toTypography.material2018or why not evenTypography.material2021.typographyforFlexColorSchemeorFlexThemeData, theuseTextThemeproperty has no impact on used typography at all.The
SegmentedButtonunselected button foreground color defaults to the correct M3 spec coloronSurface. This is a change from 7.0.0-dev.2, but not considered style breaking, since it has not existed in previous stable versions. Flutter 3.7.3 and earlier versions, via a spec deviation bug defaults to usingprimarycolor. See issue #119733 for more information. Using the newsegmentedButtonUnselectedForegroundSchemeColorwe can also define it to use theprimarycolor, that Flutter in version 3.7 uses as default. This selection actually looks quite nice. Some might say it looks better than the M3 specification, but that is why easy theming configurations are there, so you can change it to fit your design preferences.In
FlexSubThemesthefilledButtonThemepropertybaseSchemecolorwas renamed tobackgroundSchemeColor. This is a change from 7.0.0-dev.2, but not considered breaking since it has not existed in any previous stable versions.Remove: The
ListTileThemeDataworkaround added in version 7.0.0-dev.2 was removed from core defaults. The issue (M3) Consider improving efficiency for ListTile defaults andtileColordefault flutter/flutter#117700 never landed in Flutter 3.7 and its workaround is not needed. Extra setting of property value oftileColor: Colors.transparentinListTiles used in elevated popupmenus were also removed from the Playground app. In previous dev releases, they were used to hide the issue in M3 mode in the app, when FCS was not used.Remove: The creation of
IconThemeandprimaryIconThemewhen opting in on sub themes, was removed. Previously, their colors were set to be equal to the color of same typography color asused on
TextThemenadPrimaryTextTheme, by styleTitleLarge. This is no longer needed and also got in the way of getting the undefined default behavior forIconThemein some widgets. Like newIconButtonThemeDatain master channel.THEMES PLAYGROUND
The Themes Playground is example number 5 in the package repository, originally included as the last step in a "how to use FlexColorScheme" training tutorial. Since its humble introduction it has grown into a notable and quite extensive application of its own, and is too extensive to serve as a very helpful tutorial step anymore. Despite having many advanced and useful features as a companion application to the FlexColorScheme package, it is architecturally identical to steps and examples 3 and 4 in the tutorial.
The application has an architecture that is a bit too simplistic to be extended to offer all features users are asking for. There is a plan to refactor it and make it into a proper stand-alone application developed in its own repo. This is potentially the last major release of the Themes Playground in its current form, and as being included with the FlexColorScheme package as "just an example" of how to use the package to build a dynamically themed app, which is how it started. It will still remain in minor and fix versions of v7, but will likely be removed in a future v8 version of the FlexColorScheme package.
As a tutorial and example app, the Themes Playground has never had any functional guarantees or even any tests at all of its own. This is still the case. The FlexColorScheme package has and always aims for 100% test coverage in its stable releases.
Despite Themes Playground not having any formal guarantees, it is extensively used and user tested during development of FlexColorScheme releases. In addition to being a very useful tool to configure and experiment with different themes for Flutter apps, and to quickly copy needed API configuration to get the same theme in your app. It is also an excellent tool to use during development of the FlexColorScheme package. It is used to visually see and verify that all features in the package actually do what is expected of them. The changes to the Themes Playground app are also generally already quite thoroughly tracked, going back many releases. Changes to version v7.0.0-dev.3, from v7.0.0-dev.2 are listed below.
usedColorsvalue 7 to the "Theme Colors" panel. It is presented more logically in the UI than a number, to make it more understandable.NavigationBaricon and label colors. API already existed in FCS.NavigationRailicon and label colors. API already existed in FCS.ExpansionTileandExpansionPanelListto panel ListTile and Widget Showcase.NavigationDrawerto panel NavigationDrawer.NavigationDrawerto panel Navigation Drawer.NavigationBarto panel Navigation Bar.NavigationRailto panel Navigation Rail.SnackBaraction button to panel BottomSheet, Snack Banner. The UI also got better testing feature of both fixed and floatingSnackBarand correct defaults info for different settings and modes.TabBarin M3 to panel TabBar. Unfortunately, the feature does not work due to a bug in Flutter. The issue has been fixed in the master channel via [PR #119690](Fix Material3 TabBarTheme.dividerColor not working flutter/flutter#119690, but is not available in latest stable (3.7.7).TabBarto panel TabBar.NavigationDrawerto panel Navigation Drawer.FocusTraversalGroup:s and by letting important UI controls get focus on tap. This was done to make keyboard usage of the Playground easier. Its semantics were also improved, by adding the scheme names in the color selector to semantics.defaultRadiusAdaptiveandadaptiveRadiusto panel Component themes. They are used to define to make a platform adaptive override to the global border radius override value.menuBarBackgroundSchemeColor,menuItemBackgroundSchemeColor,menuItemForegroundSchemeColor,menuIndicatorBackgroundSchemeColor,menuIndicatorForegroundSchemeColor,menuIndicatorRadiusand formenuPaddingproperties via start, end, top, bottom values to panel Menus and codegen for same props.AlertDialog,TimePickerandDatePickerdialogs to panel Dialogs and Widget showcase.TODO BEFORE FCS STABLE 7.0.0 RELEASE
FlexSubThemeswith all its new component themes is only 73% tested now, all other package files have 100% test coverage.TODO AFTER FCS STABLE 7.0.0 RELEASE
This discussion was created from the release Version 7.0.0-dev.3.
Beta Was this translation helpful? Give feedback.
All reactions