Comments (1)
Hi again @laterdayi 😄
FlexColorScheme only returns ThemeData
and can only impact the SystemUiOverlayStyle
via things that are a part of theming. There is only one place where it currently is, the AppBarTheme
. In some issue Flutter requests I have wished that we could have more control via themes, but currently we cannot.
If a screen has an AppBar
, it can make the Android top status bar transparent. FlexColorScheme actually does so by default in both M2/M3 mode. This is my opinionated choice, since I think it looks much better. In M3 mode the Flutter Android default themed AppBar
is actually also transparent by default.
You can actually only see the impact of this toggle in the Themes Playground if you build the playground for an Android device and run it on it. Then it will toggle the transparent status bar of the Playground itself when you try. The simulated apps are just mock paintings and do not have a status bar.
The setting is ON by default, so in generated code it actually only writes it out if your turn it OFF:
If a screen does not have an AppBar
FlexColorScheme produced ThemeData cannot change it. Also setting SystemUiOverlayStyle
properties that concern the various system navigation bar options in an AppBar or its theme, do nothing to change the system navigation bar colors.
The themedSystemNavigationBar
What FlexColorScheme does do though, is that it provides a static helper that is designed to be used with the AnnotatedRegion
widget to make it easier to configure the navigation bar to match current theme and attach it to the widget tree via the AnnotatedRegiosn
widget. And also to control status bar when there is no AppBar
on a screen.
This helper is called FlexColorScheme.themedSystemNavigationBar
.
There is info in the FCS docs about it here: https://docs.flexcolorscheme.com/deep_dives#themed-system-navigation-bar-in-android
And it is API docs are here: https://pub.dev/documentation/flex_color_scheme/latest/flex_color_scheme/FlexColorScheme/themedSystemNavigationBar.html
In the "copy paste from playground" example app you can find a simple usage example here:
The Themes Playground app also has a section and info about the Android system navigation bar. Where it also explains about it and that the features in it only works if build the Playground app for an Android app. Then using the toggles modify the settings for the app itself by adjusting corresponding values in FlexColorScheme.themedSystemNavigationBar
used by the Themes Playground app itself. Of course this only visible if it is built as Android app.
Where that is happening and how it is done is here:
Complicated Android system navigation bar
Controlling the system navigation bar in Android in Flutter used to be difficult, here is an example of past issue that can be interesting to read to learn more about it: flutter/flutter#100027.
This is a good issue with links to many topics on the matter System Navigation Bar complications in Android, some solved, some not: flutter/flutter#112301
Status in FCS?
At the current of SystemUiOverlayStyle
support via theming and helpers, FlexColorScheme already does pretty much as much as is possible on the topic.
There are some older questions on this topic too in either issues or discussion, I'll edit attach a link if/when I find it.
from flex_color_scheme.
Related Issues (20)
- No android navigation bar in themes playground simulator when running in web platform HOT 1
- [TimePicker] Clock is not filled with color HOT 2
- Better organization of enabled and disabled chips and rename elevated chips. HOT 3
- How to use native themeData when using flex_color_scheme HOT 1
- Dense dropdownMenuTheme is not working HOT 15
- When setting up InputDecoration contentPadding, you must set isDense or it won't work HOT 3
- material 3 app bar color HOT 18
- AppBar color issue when using seed generated scheme with key color locked
- Playground: FAB fabSchemeColor code for value SchemeColor.secondary is not generated.
- How to change the theme color through the button HOT 2
- Provides copywith for FlexScheme HOT 2
- Can't copy all theme values from themeColors in themesplayground? This was possible before, and it worked HOT 4
- Add enhanced enum functions to `FlexScheme` to get its associated data and colors
- Building on M1 causes error HOT 2
- How to set status bar icon black ? HOT 2
- Define card shape in FCS? HOT 2
- Error: Type argument 'double' doesn't conform to the bound 'Enum?' of the type variable 'T' on 'EnumProperty'. HOT 4
- How to set a new scaffold background color with opacity HOT 1
- NavigationDrawerDestination items do not follow theme background HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flex_color_scheme.