当前位置:网站首页>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);
边栏推荐
- Asynchronous artifact: implementation principle and usage scenario of completable future
- Leetcode: a single element in an ordered array
- Rest reference
- The latest analysis of crane driver (limited to bridge crane) in 2022 and the test questions and analysis of crane driver (limited to bridge crane)
- Development trend and market demand analysis report of China's energy storage battery industry Ⓩ 2022 ~ 2028
- [golang] leetcode intermediate - alphabetic combination of island number and phone number
- Cognitive fallacy: Wittgenstein's ruler
- Preliminary analysis of smart microwave radar module
- Is the account opening of Guotai Junan Securities safe and reliable? How to open Guotai Junan Securities Account
- The latest analysis of R1 quick opening pressure vessel operation in 2022 and the examination question bank of R1 quick opening pressure vessel operation
猜你喜欢
Preliminary analysis of smart microwave radar module
Data consistency between redis and database
2022 safety officer-a certificate registration examination and summary of safety officer-a certificate examination
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
[actual combat record] record the whole process of the server being attacked (redis vulnerability)
IPhone development swift foundation 09 assets
Niuke winter vacation training camp 4 g (enumeration optimization, Euler power reduction)
Awk getting started to proficient series - awk quick start
Morning flowers and evening flowers
Exclusive interview with the person in charge of openkruise: to what extent has cloud native application automation developed now?
随机推荐
Miscellaneous things that don't miss the right business
DR-AP40X9-A-Qualcomm-IPQ-4019-IPQ-4029-5G-4G-LTE-aluminum-body-dual-band-wifi-router-2.4GHZ-5GHz-QSD
Covariance
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
Cesium terrain clipping draw polygon clipping
[automation operation and maintenance novice village] flask-2 certification
Exclusive interview with the person in charge of openkruise: to what extent has cloud native application automation developed now?
Unique in China! Alibaba cloud container service enters the Forrester leader quadrant
Kali2021.4a build PWN environment
User login function: simple but difficult
国泰君安证券开户是安全可靠的么?怎么开国泰君安证券账户
Conditional statements of shell programming
[dynamic programming] Jisuan Ke: Jumping stake (variant of the longest increasing subsequence)
Leetcode problem solving - 235 Nearest common ancestor of binary search tree
Sed、Awk
Bluebridge cup Guoxin Changtian single chip microcomputer -- hardware environment (I)
How can enterprises and developers take advantage of the explosion of cloud native landing?
Exness: the Central Bank of England will raise interest rates again in March, and inflation is coming
Exclusive interview with the person in charge of openkruise: to what extent has cloud native application automation developed now?
6.2 normalization 6.2.5 third normal form (3NF)