![]() ![]() )) Full Code import 'package:flutter/material. tSystemUIOverlayStyle(SystemUiOverlayStyle( StatusBarIconBrightness: Brightness.light,įor iOS, the brightness of the top status bar can be set by passing the statusBarBrightness argument. Otherwise, if you set the value to Brightness.dark, the icons color will be set to dark. If you set the value to Brightness.light, the icons color will be set to light. Keep the status bar readable and don’t imply that content behind it is interactive. ![]() By default, the background of the status bar is transparent, allowing content beneath to show through. It only affects Android version M and greater. A dark status bar works well above light-color content and a light status bar works well above dark-color content. The brightness of the top status bar icons can be set by passing statusBarIconBrightness whose type is Brightness enum. To make the status bar looks transparent, you can set the opacity of the color. The color of the status bar can be set by passing a Color as the statusBarColor argument. Beware that using the method along with certain widgets such as AppBar or CupertinoNavigationBar may produce unexpected results since those widget may override the style. For example, you can put it inside the initState or build method. If you want to have different styles for each page or route, you need to call the method inside the respective widget. If you want to apply the same style to all routes in your application, you can call it inside the main method. Therefore, if the user navigates to another route, the applied style will not disappear until the tSystemUIOverlayStyle is called again to override the style. If you call the static method, the change will persist across all routes in your application. While the previous way (using AppBar only works if you have an AppBar on the top, the tSystemUIOverlayStyle should only be used if you don't have an AppBar or CupertinoNavigationBar. You can use tSystemUIOverlayStyle, which is used to set the SystemUiOverlayStyle. But this way, when you switch the interface under the UINavigationController system, because there. There is another way to set the style of the status bar. navigationController setNavigationBarHidden:NO animated:NO. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |