当前位置:网站首页>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);
边栏推荐
- Development mode and Prospect of China's IT training industry strategic planning trend report Ⓣ 2022 ~ 2028
- Buuctf, misc: n solutions
- 1 Introduction to spark Foundation
- Common problems in multi-threaded learning (I) ArrayList under high concurrency and weird hasmap under concurrency
- LeetCode 1647. Minimum deletion times of unique character frequency
- 2022 safety officer-a certificate registration examination and summary of safety officer-a certificate examination
- [dynamic planning] counting garlic customers: the log of garlic King (the longest increasing public subsequence)
- [sg function]split game (2020 Jiangxi university student programming competition)
- Introduction to kubernetes
- Unique in China! Alibaba cloud container service enters the Forrester leader quadrant
猜你喜欢

Data consistency between redis and database

Blue Bridge Cup Guoxin Changtian single chip microcomputer -- led lamp module (V)

Yyds dry goods inventory Spring Festival "make" your own fireworks

How to connect a laptop to a projector

6.0 kernel driver character driver
![[automation operation and maintenance novice village] flask-2 certification](/img/9a/a9b45e1f41b9b75695dcb06c212a69.jpg)
[automation operation and maintenance novice village] flask-2 certification

Control loop of program (while loop)
![[actual combat record] record the whole process of the server being attacked (redis vulnerability)](/img/9c/34b916aca2f9270ec4cf4651f0de7e.jpg)
[actual combat record] record the whole process of the server being attacked (redis vulnerability)

2022 G3 boiler water treatment registration examination and G3 boiler water treatment examination papers

Data consistency between redis and database
随机推荐
国泰君安证券开户是安全可靠的么?怎么开国泰君安证券账户
The 14th five year plan and investment feasibility study report of China's industry university research cooperation Ⓧ 2022 ~ 2028
Introduction to kubernetes
Rest参考
Redis single thread and multi thread
2022 safety officer-b certificate examination summary and safety officer-b certificate simulation test questions
[golang] leetcode intermediate - alphabetic combination of island number and phone number
How to solve the problem of requiring a password when accessing your network neighborhood on your computer
Market layout planning and latest dynamic analysis report of China's smart public security industry Ⓕ 2022 ~ 2028
On my first day at work, this API timeout optimization put me down!
[template summary] - binary search tree BST - Basics
Yyds dry goods inventory Spring Festival "make" your own fireworks
(POJ - 2912) rochambau (weighted concurrent search + enumeration)
How does sentinel, a traffic management artifact, make it easy for business parties to access?
Cognitive fallacy: what is dimensional curse
Leetcode problem solving - 235 Nearest common ancestor of binary search tree
string
Tkinter Huarong Road 4x4 tutorial III
Common problems in multi-threaded learning (I) ArrayList under high concurrency and weird hasmap under concurrency
DR882-Qualcomm-Atheros-QCA9882-2T2R-MIMO-802.11ac-Mini-PCIe-Wi-Fi-Module-5G-high-power




