|
@@ -1,3 +1,4 @@
|
|
|
|
|
+import 'package:flutter/material.dart';
|
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
import 'package:go_router/go_router.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
|
|
|
@@ -31,6 +32,14 @@ class NavigationChannel {
|
|
|
case 'navigateTo':
|
|
case 'navigateTo':
|
|
|
final route = call.arguments as String?;
|
|
final route = call.arguments as String?;
|
|
|
if (route != null && route.isNotEmpty) {
|
|
if (route != null && route.isNotEmpty) {
|
|
|
|
|
+ // 在 widget 树重建前先设置状态栏,避免缓存引擎二次打开时
|
|
|
|
|
+ // Android Activity 主题覆盖 Flutter 的状态栏设置
|
|
|
|
|
+ SystemChrome.setSystemUIOverlayStyle(
|
|
|
|
|
+ const SystemUiOverlayStyle(
|
|
|
|
|
+ statusBarColor: Colors.transparent,
|
|
|
|
|
+ statusBarIconBrightness: Brightness.dark,
|
|
|
|
|
+ ),
|
|
|
|
|
+ );
|
|
|
router.go(route);
|
|
router.go(route);
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|