Fix status bar's icons' color change when switching page

This commit is contained in:
Calcitem 2021-07-17 20:07:52 +08:00
parent 751ca0a286
commit 473ed783f9
No known key found for this signature in database
GPG Key ID: F2F7C29E054CFB80
2 changed files with 6 additions and 5 deletions

View File

@ -21,7 +21,6 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:sanmill/common/config.dart';
import 'package:sanmill/l10n/resources.dart';
import 'package:sanmill/mill/position.dart';
import 'package:sanmill/mill/types.dart';

View File

@ -96,13 +96,15 @@ Future<void> main() async {
if (Platform.isAndroid) {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent),
SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarBrightness: Brightness.light,
statusBarIconBrightness: Brightness.dark,
),
);
}
/*
SystemChrome.setEnabledSystemUIOverlays([]);
*/
//SystemChrome.setEnabledSystemUIOverlays([]);
}
RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>();