发布于 2020-10-28 15:23:11
谢谢你的快速回答。可悲的是我已经这么做了:
@override
Widget build(BuildContext context) {
return Scaffold(
key: _scaffoldKey,
body: SafeArea(
child: Center(
child: ListView(
shrinkWrap: true,
children: [
Center(
child: Text(
_pageTitle,
style: Theme.of(context).textTheme.headline1,
),
),
Center(child: Text(_pageSubTitle)),
loginForm(context),
],
),
),
),
);
}但遗憾的是,这不管用
我还在我的主要功能中设置了系统值:
void main() {
SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
systemNavigationBarColor: MAIN_LIGHT_GREEN, // navigation bar color
statusBarColor: MAIN_LIGHT_GREEN,
statusBarIconBrightness: Brightness.dark,
systemNavigationBarIconBrightness: Brightness.light,
statusBarBrightness: Brightness.light,
));
runApp(MyApp());
}发布于 2020-10-28 16:19:39
显示状态栏:-
SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);显示转换状态栏:-
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
));https://stackoverflow.com/questions/64573812
复制相似问题