diff --git a/android/app/src/main/res/drawable-hdpi/splash.png b/android/app/src/main/res/drawable-hdpi/splash.png
new file mode 100644
index 0000000..d3be17a
Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/splash.png differ
diff --git a/android/app/src/main/res/drawable-mdpi/splash.png b/android/app/src/main/res/drawable-mdpi/splash.png
new file mode 100644
index 0000000..90a7706
Binary files /dev/null and b/android/app/src/main/res/drawable-mdpi/splash.png differ
diff --git a/android/app/src/main/res/drawable-v21/background.png b/android/app/src/main/res/drawable-v21/background.png
index ec54f72..3fb4d80 100644
Binary files a/android/app/src/main/res/drawable-v21/background.png and b/android/app/src/main/res/drawable-v21/background.png differ
diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml
index 78e7ad1..3cc4948 100644
--- a/android/app/src/main/res/drawable-v21/launch_background.xml
+++ b/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -1,6 +1,9 @@
-
+
+
+
+
diff --git a/android/app/src/main/res/drawable-xhdpi/splash.png b/android/app/src/main/res/drawable-xhdpi/splash.png
new file mode 100644
index 0000000..14e87e2
Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/splash.png differ
diff --git a/android/app/src/main/res/drawable-xxhdpi/splash.png b/android/app/src/main/res/drawable-xxhdpi/splash.png
new file mode 100644
index 0000000..bdc5d30
Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/splash.png differ
diff --git a/android/app/src/main/res/drawable-xxxhdpi/splash.png b/android/app/src/main/res/drawable-xxxhdpi/splash.png
new file mode 100644
index 0000000..0189954
Binary files /dev/null and b/android/app/src/main/res/drawable-xxxhdpi/splash.png differ
diff --git a/android/app/src/main/res/drawable/background.png b/android/app/src/main/res/drawable/background.png
index ec54f72..3fb4d80 100644
Binary files a/android/app/src/main/res/drawable/background.png and b/android/app/src/main/res/drawable/background.png differ
diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml
index 78e7ad1..3cc4948 100644
--- a/android/app/src/main/res/drawable/launch_background.xml
+++ b/android/app/src/main/res/drawable/launch_background.xml
@@ -1,6 +1,9 @@
-
+
+
+
+
diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png
index ec54f72..3fb4d80 100644
Binary files a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png and b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
index 71e9c81..90a7706 100644
Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
index 71e9c81..14e87e2 100644
Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
index 71e9c81..bdc5d30 100644
Binary files a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard
index 55c0cae..641ce7b 100644
--- a/ios/Runner/Base.lproj/LaunchScreen.storyboard
+++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -38,7 +38,7 @@
-
+
diff --git a/lib/main.dart b/lib/main.dart
index 8a9f55a..b4e3b65 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,9 +1,8 @@
-import 'package:flutter/foundation.dart';
+import 'package:bistro/common/global.dart';
import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
-//import 'common/access_control_filter.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
-// import 'package:flutter_native_splash/flutter_native_splash_web.dart';
// import 'package:flutter_localizations/flutter_localizations.dart';
import 'app.dart';
@@ -14,6 +13,10 @@ import 'router/router.dart';
void main() {
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
+ SystemChrome.setEnabledSystemUIMode(
+ SystemUiMode.edgeToEdge,
+ overlays: [SystemUiOverlay.bottom, SystemUiOverlay.top],
+ );
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
runApp(const Bistro());
}
@@ -28,18 +31,16 @@ class Bistro extends StatelessWidget {
title: '小酒馆',
theme: ThemeData(
fontFamily: "SongTiHeavy",
- primaryColor: const Color(0xFFff857a),
- // primaryColor: const Color(0xFF5f2500),
- primaryColorDark: Colors.white60,
- appBarTheme: const AppBarTheme(color: Colors.white),
- bottomAppBarTheme: const BottomAppBarTheme(color: Color(0xFFFFF7F8)),
- colorScheme: ColorScheme.fromSwatch(
- primarySwatch: Colors.amber,
- )
- .copyWith(
- secondary: Colors.deepOrangeAccent,
- )
- .copyWith(background: const Color(0xFFFFF7F8)),
+ primaryColor: const Color(0xFFD56937),
+ primaryColorDark: const Color(0xFFD56937),
+ scaffoldBackgroundColor: const Color(0xFF939D99),
+ appBarTheme: const AppBarTheme(color: Color(0xff384444)),
+ bottomAppBarTheme: const BottomAppBarTheme(
+ color: Color(0xff2a2a22), surfaceTintColor: Color(0xffd56937)),
+ colorScheme: const ColorScheme.dark(
+ primary: Color(0xFFD56937),
+ secondary: Color(0xFFC8C2B4),
+ background: Color(0xff384444)),
),
home: const BistroFrame(
title: '小酒馆',
@@ -127,18 +128,19 @@ class BistroFrameState extends State {
// print('ready in 3...');
// }
// await Future.delayed(const Duration(seconds: 1));
- if (kDebugMode) {
- print('ready in 2...');
- }
- await Future.delayed(const Duration(seconds: 1));
- if (kDebugMode) {
- print('ready in 1...');
- }
- await Future.delayed(const Duration(seconds: 1));
- if (kDebugMode) {
- print('go!');
- }
- FlutterNativeSplash.remove();
+ // if (kDebugMode) {
+ // print('ready in 2...');
+ // }
+ // await Future.delayed(const Duration(seconds: 1));
+ // if (kDebugMode) {
+ // print('ready in 1...');
+ // }
+ // await Future.delayed(const Duration(seconds: 1));
+ // if (kDebugMode) {
+ // print('go!');
+ // }
+ await Future.delayed(const Duration(seconds: 10));
+ // FlutterNativeSplash.remove();
}
@override
@@ -179,13 +181,14 @@ class BistroFrameState extends State {
//设置默认未选中的状态
double size = 14;
- Color color = Colors.black87;
- bool isShow = item["display"];
-
+ Color color = Theme.of(context).colorScheme.secondary;
TextStyle style = TextStyle(
fontSize: size,
+ color: color,
);
+ bool isShow = item["display"];
+
Widget child;
if (!isShow) {
child = Container();
diff --git a/pubspec.yaml b/pubspec.yaml
index 88c0f0b..bc81f54 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -130,8 +130,8 @@ flutter_native_splash:
# of your splash screen to a solid color. Use background_image to set the background of your
# splash screen to a png image. This is useful for gradients. The image will be stretch to the
# size of the app. Only one parameter can be used, color and background_image cannot both be set.
-# color: "#e1f5fe"
-# background_image: "res/assets/images/Splash.png"
+ color: "#D59C6A"
+# background_image: res/assets/images/Splash.png
# Optional parameters are listed below. To enable a parameter, uncomment the line by removing
# the leading # character.
@@ -139,21 +139,21 @@ flutter_native_splash:
# The image parameter allows you to specify an image used in the splash screen. It must be a
# png file and should be sized for 4x pixel density.
# image: assets/logo_lockup_flutter_vertical.png
-# image: "res/assets/images/Splash.png"
+ image: res/assets/images/Splash.png
# This property allows you to specify an image used as branding in the splash screen. It must be
# a png file. Currently, it is only supported for Android and iOS.
- branding: assets/dart.png
+ #branding: assets/dart.png
# Specify your branding image for dark mode.
- branding_dark: assets/dart_dark.png
+ #branding_dark: assets/dart_dark.png
# To position the branding image at the bottom of the screen you can use bottom, bottomRight,
# and bottomLeft. The default values is bottom if not specified or specified something else.
#
# Make sure this content mode value should not be similar to android_gravity value and
# ios_content_mode value.
- branding_mode: bottom
+ #branding_mode: bottom
# The color_dark, background_image_dark, and image_dark are parameters that set the background
# and image when the device is in dark mode. If they are not specified, the app will use the
@@ -186,7 +186,7 @@ flutter_native_splash:
#ios_content_mode: center
#
# web_image_mode can be one of the following modes: center, contain, stretch, and cover.
- #web_image_mode: center
+ web_image_mode: contain
# To hide the notification bar, use the fullscreen parameter. Has no affect in web since web
# has no notification bar. Defaults to false.
diff --git a/web/index.html b/web/index.html
index aa2819a..3b72463 100644
--- a/web/index.html
+++ b/web/index.html
@@ -33,7 +33,11 @@
-
+
+
+
+
+
diff --git a/web/splash/img/dark-1x.png b/web/splash/img/dark-1x.png
new file mode 100644
index 0000000..90a7706
Binary files /dev/null and b/web/splash/img/dark-1x.png differ
diff --git a/web/splash/img/dark-2x.png b/web/splash/img/dark-2x.png
new file mode 100644
index 0000000..14e87e2
Binary files /dev/null and b/web/splash/img/dark-2x.png differ
diff --git a/web/splash/img/dark-3x.png b/web/splash/img/dark-3x.png
new file mode 100644
index 0000000..bdc5d30
Binary files /dev/null and b/web/splash/img/dark-3x.png differ
diff --git a/web/splash/img/dark-4x.png b/web/splash/img/dark-4x.png
new file mode 100644
index 0000000..0189954
Binary files /dev/null and b/web/splash/img/dark-4x.png differ
diff --git a/web/splash/img/light-1x.png b/web/splash/img/light-1x.png
new file mode 100644
index 0000000..90a7706
Binary files /dev/null and b/web/splash/img/light-1x.png differ
diff --git a/web/splash/img/light-2x.png b/web/splash/img/light-2x.png
new file mode 100644
index 0000000..14e87e2
Binary files /dev/null and b/web/splash/img/light-2x.png differ
diff --git a/web/splash/img/light-3x.png b/web/splash/img/light-3x.png
new file mode 100644
index 0000000..bdc5d30
Binary files /dev/null and b/web/splash/img/light-3x.png differ
diff --git a/web/splash/img/light-4x.png b/web/splash/img/light-4x.png
new file mode 100644
index 0000000..0189954
Binary files /dev/null and b/web/splash/img/light-4x.png differ
diff --git a/web/splash/img/light-background.png b/web/splash/img/light-background.png
deleted file mode 100644
index ec54f72..0000000
Binary files a/web/splash/img/light-background.png and /dev/null differ
diff --git a/web/splash/style.css b/web/splash/style.css
index c65db93..1056da4 100644
--- a/web/splash/style.css
+++ b/web/splash/style.css
@@ -5,8 +5,7 @@ html {
body {
margin: 0;
min-height: 100%;
- background-color: #ffffff;
- background-image: url("img/light-background.png");
+ background-color: #D59C6A;
background-size: 100% 100%;
}