Flutterはステータスバーの色を変更します



Flutter Changes Status Bar Color



たとえば、Flutterでは、iOSのステータスバーでの時間やネットワーク信号などのフォントの色の変更には、次の2つの方法があります。
in system_chrome.dartファイルには、異なるステータスバーのフォントの色を変更するための2つのコードがあります。

白い

void main() { runApp(MyApp()) //white SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light) } class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', home: Scaffold( backgroundColor: Colors.blue, body: Container(), ), ) } }

画像



void main() { runApp(MyApp()) //black SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark) } class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', home: Scaffold( backgroundColor: Colors.white, body: Container(), ), ) } }

画像