mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 07:44:26 +01:00
opt & fix
- update make script (taget mac) - only set system overlay once
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:toolbox/core/utils.dart';
|
||||
import 'package:toolbox/data/res/build_data.dart';
|
||||
import 'package:toolbox/data/store/setting.dart';
|
||||
import 'package:toolbox/generated/l10n.dart';
|
||||
@@ -26,6 +27,7 @@ class MyApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
setTransparentNavigationBar(context);
|
||||
return ValueListenableBuilder<int>(
|
||||
valueListenable: locator<SettingStore>().primaryColor.listenable(),
|
||||
builder: (_, value, __) {
|
||||
|
||||
@@ -75,13 +75,9 @@ Widget buildSwitch(BuildContext context, StoreProperty<bool> prop,
|
||||
void setTransparentNavigationBar(BuildContext context) {
|
||||
if (Platform.isAndroid) {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
systemNavigationBarColor: Colors.transparent,
|
||||
systemNavigationBarContrastEnforced: true,
|
||||
systemNavigationBarIconBrightness:
|
||||
isDarkMode(context) ? Brightness.light : Brightness.dark,
|
||||
));
|
||||
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
||||
systemNavigationBarColor: Colors.transparent,
|
||||
systemNavigationBarContrastEnforced: true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 135;
|
||||
static const int build = 136;
|
||||
static const String engine =
|
||||
"Flutter 3.0.0 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision ee4e09cce0 (3 days ago) • 2022-05-09 16:45:18 -0700\nEngine • revision d1b9a6938a\nTools • Dart 2.17.0 • DevTools 2.12.2\n";
|
||||
static const String buildAt = "2022-05-13 09:32:15.654170";
|
||||
"Flutter 3.0.0 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision ee4e09cce0 (9 days ago) • 2022-05-09 16:45:18 -0700\nEngine • revision d1b9a6938a\nTools • Dart 2.17.0 • DevTools 2.12.2\n";
|
||||
static const String buildAt = "2022-05-19 15:59:10.728748";
|
||||
static const int modifications = 15;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,6 @@ class _MyHomePageState extends State<MyHomePage>
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
setTransparentNavigationBar(context);
|
||||
super.build(context);
|
||||
return WillPopScope(
|
||||
child: _buildMain(context),
|
||||
|
||||
Reference in New Issue
Block a user