当前位置:网站首页>Summary of fluent systemchrome
Summary of fluent systemchrome
2022-07-03 22:25:00 【nicepainkiller】
Fix App toward
* Single direction
If it is necessary to fix the application in a single direction , Just set the required direction attribute ;
// Vertically SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); // Vertical down SystemChrome.setPreferredOrientations([DeviceOrientation.portraitDown]); // Horizontal left SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]); // Horizontal right SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeRight]);
* Multidirectional
If required, the direction of application varies with gravity induction , Multiple direction attributes need to be set ;
// In the vertical direction SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); // horizontal direction SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeLeft]); // Multidirectional SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeLeft, DeviceOrientation.portraitUp]);
Tips:
- portraitDown Properties, please note , It usually doesn't work in multiple directions , The system will not reverse by default ;
- In multi-directional setting, the initial direction can be divided into two cases , The first one is : The current gravity sensing direction is not in the set multi direction list , The initial direction is the first setting method in the list ; The second kind : The current gravity sensing direction is in the set multi direction list , Regardless of the order , By default, the current gravity sensing direction is displayed ( Not portraitDown)
Set the top status bar and Bottom system key
Top status bar Top status bar Time Electric quantity Display of operator and other information hide
**setEnabledSystemUIOverlays** Is to specify the system overlay that is visible when the application is running , Mainly for the operation of the status bar , It's hard to read , But it's clear from the test cases ; Parameters are divided into **top Top / bottom Bottom ** Two kinds of ;
* Only the top status bar SystemUiOverlay.top
SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top]);
* Only bottom system buttons SystemUiOverlay.bottom
SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]);
* Both have
SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top, SystemUiOverlay.bottom]);
Set status bar color Top + Bottom
setSystemUIOverlayStyle: Used to style the top and bottom of the status bar , The default is **light** and **dark** Pattern , You can also customize the style according to your needs ;
* Bottom status bar color systemNavigationBarColor
This attribute is only used for **Android** Equipment and **SDK >= O** when , Bottom status bar color ; SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(systemNavigationBarColor: Colors.pink));
* Bottom status bar and main content split line color systemNavigationBarDividerColor
This attribute is only used for **Android** Equipment and **SDK >= P** when , Bottom status bar and main content split line color , The effect is not obvious ; SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(systemNavigationBarDividerColor: Colors.yellow));
![]()
* Bottom status bar icon style systemNavigationBarIconBrightness
This attribute is only used for **Android** Equipment and **SDK >= O** when , Bottom status bar icon style , Mainly three key colors SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(systemNavigationBarColor: Colors.pink));
![]()
* Top status bar background color statusBarColor
This attribute is only used for **Android** Equipment and **SDK >= M** when , Top status bar color ; SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(statusBarColor: Colors.red));
* Top status bar icon color statusBarIconBrightness
This attribute is only used for **Android** Equipment and **SDK >= M** when , The brightness of the top status bar icon ; But the side dish doesn't feel obvious ; SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(statusBarIconBrightness: Brightness.dark));
* Top status bar color SystemUiOverlayStyle; This state Yes, there are gray and Bright colors Two kinds of
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark); SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark);
边栏推荐
- SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]
- 4 environment construction -standalone ha
- 320. Energy Necklace (ring, interval DP)
- UC Berkeley proposes a multitask framework slip
- Leetcode week 4: maximum sum of arrays (shape pressing DP bit operation)
- Electronic tube: Literature Research on basic characteristics of 6j1
- [dynamic programming] Ji Suan Ke: Suan tou Jun breaks through the barrier (variant of the longest increasing subsequence)
- Analysis report on the development trend and Prospect of global and Chinese supercontinuum laser source industry Ⓚ 2022 ~ 2027
- Blue Bridge Cup Guoxin Changtian single chip microcomputer -- led lamp module (V)
- How about agricultural futures?
猜你喜欢

540. Single element in ordered array

This time, thoroughly understand bidirectional data binding 01

Go Technology Daily (2022-02-13) - Summary of experience in database storage selection
![[flax high frequency question] leetcode 426 Convert binary search tree to sorted double linked list](/img/db/b992d2b461ca17652518a1511b4947.gif)
[flax high frequency question] leetcode 426 Convert binary search tree to sorted double linked list

Correlation

Covariance

STM32 multi serial port implementation of printf -- Based on cubemx

The latest analysis of R1 quick opening pressure vessel operation in 2022 and the examination question bank of R1 quick opening pressure vessel operation

pivot ROP Emporium

Control loop of program (while loop)
随机推荐
Some 5000+ likes, the development notes of a director of cosmic factory, leaked
Unique in China! Alibaba cloud container service enters the Forrester leader quadrant
QGIS grid processing DEM data reclassification
How to solve the problem of computer networking but showing no Internet connection
Conditional statements of shell programming
[automation operation and maintenance novice village] flask-2 certification
[Android reverse] use the DB browser to view and modify the SQLite database (copy the database file from the Android application data directory | use the DB browser tool to view the data block file)
Report on the current situation and development trend of ethoxylated sodium alkyl sulfate industry in the world and China Ⓞ 2022 ~ 2027
Cognitive fallacy: what is Fredkin's paradox
Cesium terrain clipping draw polygon clipping
Is it safe and reliable to open an account and register for stock speculation? Is there any risk?
1068. Consolidation of ring stones (ring, interval DP)
The difference between SRAM and DRAM
Blue Bridge Cup Guoxin Changtian MCU -- program download (III)
2022 free examination questions for safety management personnel of hazardous chemical business units and reexamination examination for safety management personnel of hazardous chemical business units
webAssembly
Teach you to easily learn the type of data stored in the database (a must see for getting started with the database)
regular expression
Go Technology Daily (2022-02-13) - Summary of experience in database storage selection
Analysis report on the development trend and Prospect of global and Chinese supercontinuum laser source industry Ⓚ 2022 ~ 2027




