Releases: rydmike/flex_color_scheme
Version 2.1.1
[2.1.1] - March 30, 2021
- Change: Made the VoidCallback
onSelectinFlexThemeModeOptionButtonnullable.
The optional callback allows for the button to be used e.g. as a trailing
widget in a ListTile. Keep it null to not have any callback, nor hover or Ink of its own, and use
the select event of the parent instead. When it is used as standalone button you
normally want to use this callback, but not if you want the parent to handle it, that use case was
not allowed with previous version.
Version 2.1.0
[2.1.0] - March 22, 2021
- Fix: Toggling
FlexColorScheme(transparentStatusBar)from true to false, did not restore the
Android default status bar scrim, unless the app was completely rebuilt. This has been fixed. - Fix: When using
FlexColorScheme.themedSystemNavigationBar(useDivider)in anAnnotatedRegion, toggling
useDividerfrom true to false, did not remove the system navigation bar divider again, unless the
app was completely rebuilt. This has been fixed, see API docs for more info. - Feature: The
FlexColorScheme.themedSystemNavigationBarfor styling the system navigation bar got a
new convenience propertysystemNavBarStylethat takes aFlexSystemNavBarStyleenum with values:system: For default white system nav bar in light theme and black in dark theme mode.surface: The system navigation bar will be the same color as active themecolorScheme.surfacecolor.
If your FlexColorScheme definition is set to use primary branded surface and background colors, the
same primary color blend that the surface color has received will be used.background: The system navigation bar will be the same color as active themecolorScheme.backgroundcolor.
If your FlexColorScheme definition is set to use primary branded surface and background colors, the
same primary color blend that the background color has received will be used.scaffoldBackground: The system navigation bar will be the same color as active themescaffoldBackgroundcolor.
If your FlexColorScheme definition is set to use primary branded surface and background colors, the
same primary color blend that the scaffoldBackground color has received will be used.transparent: An experimental feature. The goal is to make the system navigation bar fully transparent,
showing the background, while navigation buttons float over the background. This feature only works if it is
also configured in the Android embedder and on SDK 30 or higher.
More information in this example: https://github.com/rydmike/sysnavbar
- Examples: Added top status bar scrim toggle and system navigation divider and navbar style toggles to example 5.
These only work on Android builds and do not have any functionality on the live Web builds. - Tests: Added tests for the new features. Total 690 tests, coverage 99.76%.
Version 2.0.0
[2.0.0] - March 15, 2021
- First stable release of FlexColorScheme with sound null safety.
- Includes the changes from [2.0.0-nullsafety.1] and [2.0.0-nullsafety.2].
- Breaking: The by default enabled divider for
FlexColorScheme.themedSystemNavigationBarhas been
revised to be disabled by default. To use a divider on the top of the system navigation bar on Android,
you have to enabled it manually. This is more in line with expected default behavior.
Version 2.0.0-nullsafety.2
[2.0.0-nullsafety.2] - March 15, 2021
-
Migrated AppBar theming to use the implementation introduced in Flutter 2.0.0 instead of using
its own custom implementation for the "white" app bar theme. -
Minor change to the none default
tooltipsMatchBackground: trueborder style, it now uses
the theme divider color as its default outline color. -
The static helper
FlexColorScheme.themedSystemNavigationBarreceived three new properties
noAppBar,invertStatusIconsandsystemNavigationBarDividerColor. The old property
nullContextBackgroundwas deprecated and replaced withsystemNavigationBarColor. Example 5
has been updated to show how and when the new features can be used. -
As stated earlier in the documentation, as a planned change for version 2.0.0 the sub theme for
FloatingActionButtonThemeDatawas removed. It is thus now null as in default Flutter ThemeData.
It still produces the same default theme as before, the ThemeData definition was just no
longer needed to do so. -
Number of tests increased from 639 to 661. Coverage 99.78%.
-
Updated the documentation. Added thumbnails to Appendix A. This pub.dev version is also to test the
thumbnails work and how they look on pub.dev before stable 2.0.0 release.See API documentation for more information.
Version 2.0.0-nullsafety.1
[2.0.0-nullsafety.1] - February 4, 2021
- First version with null-safety.
- Additional breaking: Removed in version 1.3.0 deprecated
FlexSchemeSurfaceColors.themeSurface, use
FlexSchemeSurfaceColors.surfaceStyleinstead. - Number of tests reduced from 723 to 639 when all null related tests were removed.
Version 1.4.1
[1.4.1] - January 31, 2021
-
Added four new built-in color schemes.
- Barossa - Barossa red and cardin green theme.
Use enum valueFlexScheme.barossafor easy access to it. - Shark and orange - Shark grey and orange ecstasy theme.
Use enum valueFlexScheme.sharkfor easy access to it. - Big stone tulip - Big stone blue and tulip tree yellow theme.
Use enum valueFlexScheme.bigStonefor easy access to it. - Damask and lunar - Damask red and lunar green theme.
Use enum valueFlexScheme.damaskfor easy access to it.
- Barossa - Barossa red and cardin green theme.
-
Improved Semantics for the ThemeMode Widget buttons.
-
Improved FlexThemeModeSwitch widget tests, makes and checks for system mode changes.
-
More tests, totally 723 tests, codecov is now > 99.5%.
-
Added GitHub actions to automate build and to publish the examples on the Web on a new release.
-
Minor changes to the examples. Modified to not need the
latekeyword when they are converted
to null safe versions. -
Documentation:
- Added the new color schemes to the documentation.
- Minor typo corrections.
Version 1.4.1 Pre-release
[1.4.1] - January 30, 2021 - Pre-release to test Web Example build trigger
-
Added four new built-in color schemes.
- Barossa - Barossa red and cardin green theme.
Use enum valueFlexScheme.barossafor easy access to it. - Shark and orange - Shark grey and orange ecstasy theme.
Use enum valueFlexScheme.sharkfor easy access to it. - Big stone tulip - Big stone blue and tulip tree yellow theme.
Use enum valueFlexScheme.bigStonefor easy access to it. - Damask and lunar - Damask red and lunar green theme.
Use enum valueFlexScheme.damaskfor easy access to it.
- Barossa - Barossa red and cardin green theme.
-
Improved Semantics for the ThemeMode Widget buttons.
-
Improved the widget tests, makes and checks for system mode changes. Totally 723 tests, codecov > 99.5%.
-
Added GitHub actions to automate build and publish the examples on the web.
-
Minor changes to the examples. Modified to not need the
latekeyword when they are converted
to null safe versions. -
Documentation:
- Added the new color schemes to the documentation.
- Minor typo corrections.
Version 1.4.0
[1.4.0] - January 18, 2021
- Added convenience property
schemeto FlexColorScheme factories light and dark. This a shortcut for using the built-in color schemes. Thecolorsproperty can still be used as before. The.lightand.darkfactories no longer have any required properties. Ifschemeis not provided it defaults toFlexScheme.materialand if bothschemeandcolorsare provided, the scheme provided viacolorsprevail. - Updated the simple example 1 to use the new
schemeproperty, as intheme: FlexColorScheme.light(scheme: FlexScheme.mandyRed).toTheme. - Added experimental support for transparent system navigation bar for Android for SDK >= 30 (Android 11).
The support is added via newopacityproperty inFlexColorScheme.themedSystemNavigationBar.
A separate example that builds on example 5, shows and explains how and when transparent system navigation bar can be used in Android. It also shows how to design it so that it looks nice when using primary color branded background color applied to the system navigation bar in Android, when transparency is not supported, and your app uses transparent system navigation bar when running on an API level that supports it. Please see this separate small stand-alone example Android project sysnavbar on GitHub for more information. - Added more tests, now 689 tests. All color values used are now also tested, any modification to them is considered a breaking change. A bit more tests would still be nice, for the ThemeModeSwitch Widget at least. Total test coverage > 98%, it will do for now.
- Documentation:
- Changed example one and the intro, to use the new simpler
schemeproperty when using built-in schemes. - Added a section that lists which sub-themes, and which of their properties, are NOT null when creating a theme data object with FlexColorScheme.toTheme.
- Removed the "back to contents" link after each chapter. It was nice and worked fine on Github, but for some reason it did not on pub.dev.
- Tried finding and adding comments for the 3 missing API comments needed to reach 100% API documentation comments, not sure if it succeeded. I will see when the update is published.
- Changed example one and the intro, to use the new simpler
Version 1.3.0
[1.3.0] - January 7, 2021
- Marked
FlexSchemeSurfaceColors.themeSurfaceas deprecated in favor of the correctly named
FlexSchemeSurfaceColors.surfaceStyleversion. The olderthemeSurfacewill be removed when
null safe Version 2.0.0 is officially released as the main version. - Added
Diagnosticablemixin to classesFlexSchemeOnColors,FlexSchemeSurfaceColorsandFlexColorScheme,
that all also received proper identity overrides andcopyWithmethods. - Improved internal null safe behavior, with fall-backs values in some classes and helper functions.
It might make migration to null-safety easier. - Added 389 tests. Coverage is 89% based on Codecov report. Will add more tests later, enough for now.
- The tests will make the migration to null-safety easier by providing some quality control checks.
- Added GitHub actions to run all the tests and automated test coverage analysis with Codecov.
- Documentation improvements and API doc fixes.
In previous version API doc analysis says
"441 out of 444 API elements (99.3 %) have documentation comments.". I have not been able to find any missing ones.
The result from this update will only be seen after it has been uploaded, but I doubt it will change much. If
somebody happens to find the missing doc comments let my know, the IDE analyser does not find them either.
Version 1.2.0
[1.2.0] - January 4, 2021
-
Added four new built-in color schemes.
- Amber blue - Amber blaze and blue color theme, based on Material amber and blue accent colors.
Use enum valueFlexScheme.amberfor easy access to it. - Vesuvius burned - Vesuvius burned orange and eden green theme.
Use enum valueFlexScheme.vesuviusBurnfor easy access to it. - Deep purple - Deep purple daisy bush theme, based on Material deepPurple and lightBlueAccent colors.
Use enum valueFlexScheme.deepPurplefor easy access to it. - Ebony clay - Ebony clay dark blue-grey and watercourse green colored theme.
Use enum valueFlexScheme.ebonyClayfor easy access to it.
- Amber blue - Amber blaze and blue color theme, based on Material amber and blue accent colors.
-
Added a style option for the tab bar. The
FlexColorSchemecreated tab bar theme now defaults to a
TabBarThemethat fits its createdAppBarTheme, also works via the factory app bar style options. There is also
an optional style that makes the tab bar theme suitable for surface and background colors. This was the
default style before. The change to this default style is a fix to make the defaultTabBarThemeone that
fits on app bar's instead, which is expected default behavior in Flutter and Material design.
The style is set via theFlexColorSchemepropertytabBarStyleusing enum valuesFlexTabBarStyle.forAppBar
(default) andFlexTabBarStyle.forBackground. -
The themed
AppBarandBottomAppBarelevations still default to 0. However, and for convenience, the themed values
can now both be modified directly via theFlexColorSchemepropertiesappBarElevationandbottomAppBarElevation,
without need to change these frequently modified values with an extracopyWithto get them re-themed as desired.
When using the recommendedFlexColorScheme.lightandFlexColorScheme.darkfactories,appBarElevation
defaults to '0', if not defined andbottomAppBarElevationdefaults toappBarElevation, if not defined.
When using the default constructor (the factories are recommended), they both default to '0'.
Example updates
- All examples: The widget showcase now show the resulting themed tab bar on two different backgrounds, one on the
app bar color and one on background color. This can guide you in which tab bar style is right for your use case. - Example 4 and 5: The sub-page now has a demo tab bar in the app bar, and a demo bottom navigation bar.
- Example 5: Now includes a toggle that can be used to select the tab bar theme style.
- Example 5: Now includes a slider to modify the themed app bar elevation.
- Example 5: Fixed so that the Roboto font, that is always used by the examples regardless of platform, now also gets
used when you toggle to create the theme from the scheme with the ThemeData.from(colorScheme). It looked
a bit ood when it changed to platform default font on Desktop and Web versions, and FlexColorScheme.toTheme used
Roboto. This was modified so that the resulting themes use the same font and are comparable.