Skip to content

Commit 64bfc66

Browse files
committed
Release version 2.1.0
1 parent 2ceaf6a commit 64bfc66

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All notable changes to the **FlexColorScheme** package will be documented in this file.
44

5-
## [2.1.0] - March 21, 2021
5+
## [2.1.0] - March 22, 2021
66

77
* **Fix:** Toggling `FlexColorScheme(transparentStatusBar)` from true to false, did not restore the
88
Android default status bar scrim, unless the app was completely rebuilt. This has been fixed.

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,9 @@ like shown below:
12801280

12811281
<img src="https://github.com/rydmike/flex_color_scheme/blob/master/resources/FlexSchemeAppBar.gif?raw=true" alt="AppBar StatusBar" width="250"/><img src="https://github.com/rydmike/flex_color_scheme/blob/master/resources/FlexSchemeNavBar.gif?raw=true" alt="SysNavBar Style" width="250"/>
12821282

1283+
The top status bar scrim toggle and system navigation divider and sysem navbar style only work on Android builds
1284+
and do not have any functionality on the live Web example.
1285+
12831286
> **NOTE:**
12841287
> The static helper `FlexColorScheme.themedSystemNavigationBar(context, ...)` is designed to provide a convenience
12851288
> wrapper for a `SystemUiOverlayStyle` that works for screens that use and adhere to current theme mode colors.
@@ -1301,7 +1304,7 @@ The above concludes the code walk through of example 5. When we build it, the ex
13011304
the **deep blue sea** scheme. In the example below we can also see the correctly
13021305
themed system navigation bar on the Android device.
13031306

1304-
<img src="https://github.com/rydmike/flex_color_scheme/blob/master/resources/fcs_phone_ex5al.png?raw=true" alt="ColorScheme example 5 light" width="250"/><img src="https://github.com/rydmike/flex_color_scheme/blob/master/resources/fcs_phone_ex5ad.png?raw=true" alt="ColorScheme example 5 dark" width="250"/>
1307+
<img src="https://github.com/rydmike/flex_color_scheme/blob/master/resources/fcs_phone_ex5al.png?raw=true" alt="ColorScheme example 5 light" width="300"/><img src="https://github.com/rydmike/flex_color_scheme/blob/master/resources/fcs_phone_ex5ad.png?raw=true" alt="ColorScheme example 5 dark" width="300"/>
13051308

13061309
Try example 5 live on the [**web here**](https://rydmike.com/flexcolorscheme5)
13071310

example/pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ dependencies:
1111
cupertino_icons: ^1.0.2
1212

1313
# Color scheme package (by Mike Rydstrom, rydmike.com).
14-
flex_color_scheme:
15-
path: ../
14+
flex_color_scheme: ^2.1.0
1615

1716
# The Flutter SDK (by Google flutter.dev).
1817
flutter:

lib/src/flex_color_scheme.dart

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,9 +1303,9 @@ class FlexColorScheme with Diagnosticable {
13031303
/// [systemNavigationBarDividerColor]. The call to set and use the divider
13041304
/// color is only made once a none null value has been given to [useDivider].
13051305
/// Android does not use any provided alpha value on the color of the
1306-
/// divider color and calling it with null again will not remove it, thus
1307-
/// for working with transparent system navigation bars, never set any divider
1308-
/// because you can't get rid of it once it has been set.
1306+
/// divider color and calling it with null again will not remove it. Unless
1307+
/// you are working with experimental transparent system navigation bars. If
1308+
/// you are, then transparency or alpha channel on the divider also works.
13091309
///
13101310
/// Use and support for the [opacity] value on the system navigation bar
13111311
/// is EXPERIMENTAL, it ONLY works on Android API 30 (=Android 11) or higher.
@@ -1325,9 +1325,9 @@ class FlexColorScheme with Diagnosticable {
13251325

13261326
/// Use a divider line on the top edge of the system navigation bar.
13271327
///
1328-
/// Defaults to null. Keeping it null, byt omission or passing null always
1328+
/// Defaults to null. Keeping it null, by omission or passing null, always
13291329
/// omits the call to set any divider color in the created
1330-
/// [SystemUiOverlayStyle]
1330+
/// [SystemUiOverlayStyle].
13311331
///
13321332
/// The divider on the navigation bar, is only respected on Android P
13331333
/// (= Pie = API 28 = Android 9) or higher.
@@ -1484,7 +1484,9 @@ class FlexColorScheme with Diagnosticable {
14841484
// Using the theme divider color does not work, as Android system calls do
14851485
// not use the alpha channel value in the passed color. Default divider
14861486
// theme color uses alpha, using it here does not look good at all as the
1487-
// alpha channel value is not used.
1487+
// alpha channel value is not used. If you are working with enabled
1488+
// transparent system navigation bar on Android API 30 or higher, then
1489+
// opacity on the divider also works as expected.
14881490
//
14891491
// The logic below is intended to keep the `dividerColor` used in the
14901492
// [SystemUiOverlayStyle] as null as long as `useDivider` is null. As soon
@@ -1495,18 +1497,13 @@ class FlexColorScheme with Diagnosticable {
14951497
// with a null color value after it has been enabled with any known
14961498
// `SystemUiOverlayStyle` and `SystemChrome` call. The false value then
14971499
// provide means to at least hide it again, but it will still be there.
1498-
// This can be observed if you use transparent sys navbar, so never enable
1499-
// the divider if you intend to use system navigation bars that are fully
1500-
// transparent, you won't be able to get rid of it again from Flutter side
1501-
// without removing it and rebuilding the app.
15021500
//
15031501
// Worth noticing is also the the opacity does not really have any effect on
1504-
// divider color in current versions of Android. We apply it here anyway
1505-
// in case it does some day. It would be nice if it was supported for two
1506-
// reasons:
1507-
// 1. We could use Flutter default Divider theme color as its color.
1508-
// 2. We could make it invisible on transparent nav bars after it has
1509-
// has been enabled as well.
1502+
// divider color in most versions of Android. We apply it here anyway
1503+
// because if you are experimenting with transparent system navigation bar
1504+
// on Android API30 or higher it does work. It would be nice if it worked
1505+
// on lower version and without adjusting the Android embedder, then we
1506+
// could use Flutter default Divider theme color as its color.
15101507
Color? dividerColor;
15111508

15121509
if (useDivider == null) {

0 commit comments

Comments
 (0)