当前位置:网站首页>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);
边栏推荐
- Tkinter Huarong Road 4x4 tutorial III
- China HDI market production and marketing demand and investment forecast analysis report Ⓢ 2022 ~ 2028
- User login function: simple but difficult
- 2022 electrician (elementary) examination questions and electrician (elementary) registration examination
- Yyds dry goods inventory Spring Festival "make" your own fireworks
- Ansible common usage scenarios
- The latest analysis of R1 quick opening pressure vessel operation in 2022 and the examination question bank of R1 quick opening pressure vessel operation
- Pat grade A - 1164 good in C (20 points)
- Farmersworld farmers world, no faith, how to talk about success?
- Correlation
猜你喜欢

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

Bluebridge cup Guoxin Changtian single chip microcomputer -- hardware environment (I)

How to switch between dual graphics cards of notebook computer

STM32 multi serial port implementation of printf -- Based on cubemx
![[automation operation and maintenance novice village] flask-2 certification](/img/9a/a9b45e1f41b9b75695dcb06c212a69.jpg)
[automation operation and maintenance novice village] flask-2 certification

How to restore the factory settings of HP computer

Summary of basic knowledge of exception handling

2022 safety officer-b certificate examination summary and safety officer-b certificate simulation test questions

string

4 environment construction -standalone ha
随机推荐
1 Introduction to spark Foundation
Blue Bridge Cup Guoxin Changtian single chip microcomputer -- software environment (II)
Programming language (1)
Leetcode problem solving - 235 Nearest common ancestor of binary search tree
DR-AP40X9-A-Qualcomm-IPQ-4019-IPQ-4029-5G-4G-LTE-aluminum-body-dual-band-wifi-router-2.4GHZ-5GHz-QSD
Correlation
Miscellaneous things that don't miss the right business
Can you draw with turtle?
(POJ - 2912) rochambau (weighted concurrent search + enumeration)
QGIS grid processing DEM data reclassification
Report on the development status and investment planning trends of China's data center industry Ⓡ 2022 ~ 2028
Wisdom tooth technology announced that it had completed the round D financing of US $100million and had not obtained a valid patent yet
Uboot migration
The 14th five year plan for the construction of Chinese Enterprise Universities and the feasibility study report on investment Ⓓ 2022 ~ 2028
Niuke winter vacation training camp 4 g (enumeration optimization, Euler power reduction)
油猴插件
[sg function] lightoj Partitioning Game
Conditional statements of shell programming
How to obtain opensea data through opensea JS
How to restore the factory settings of HP computer




