feat(splash): 增加了启动页
BIN
android/app/src/main/res/drawable-v21/background.png
Normal file
|
After Width: | Height: | Size: 900 KiB |
@@ -1,12 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Modify this file to customize your launch splash screen -->
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="?android:colorBackground" />
|
<item>
|
||||||
|
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||||
<!-- You can insert your own image assets here -->
|
</item>
|
||||||
<!-- <item>
|
|
||||||
<bitmap
|
|
||||||
android:gravity="center"
|
|
||||||
android:src="@mipmap/launch_image" />
|
|
||||||
</item> -->
|
|
||||||
</layer-list>
|
</layer-list>
|
||||||
BIN
android/app/src/main/res/drawable/background.png
Normal file
|
After Width: | Height: | Size: 900 KiB |
@@ -1,12 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Modify this file to customize your launch splash screen -->
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:drawable="@android:color/white" />
|
<item>
|
||||||
|
<bitmap android:gravity="fill" android:src="@drawable/background"/>
|
||||||
<!-- You can insert your own image assets here -->
|
</item>
|
||||||
<!-- <item>
|
|
||||||
<bitmap
|
|
||||||
android:gravity="center"
|
|
||||||
android:src="@mipmap/launch_image" />
|
|
||||||
</item> -->
|
|
||||||
</layer-list>
|
</layer-list>
|
||||||
18
android/app/src/main/res/values-v31/styles.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
|
<item name="android:windowSplashScreenBackground">@drawable/launch_background</item>
|
||||||
|
<item name="android:forceDarkAllowed">false</item>
|
||||||
|
<item name="android:windowFullscreen">true</item>
|
||||||
|
</style>
|
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
This theme determines the color of the Android Window while your
|
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||||
|
running.
|
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
|
<item name="android:windowBackground">?android:colorBackground</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -5,6 +5,8 @@
|
|||||||
<!-- Show a splash screen on the activity. Automatically removed when
|
<!-- Show a splash screen on the activity. Automatically removed when
|
||||||
Flutter draws its first frame -->
|
Flutter draws its first frame -->
|
||||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||||
|
<item name="android:forceDarkAllowed">false</item>
|
||||||
|
<item name="android:windowFullscreen">true</item>
|
||||||
</style>
|
</style>
|
||||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
This theme determines the color of the Android Window while your
|
This theme determines the color of the Android Window while your
|
||||||
|
|||||||
23
ios/Runner/Assets.xcassets/BrandingImage.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "BrandingImage.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "BrandingImage@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "BrandingImage@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
21
ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "background.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png
vendored
Normal file
|
After Width: | Height: | Size: 900 KiB |
@@ -1,23 +1,23 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage.png",
|
"filename" : "LaunchImage.png",
|
||||||
|
"idiom" : "universal",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage@2x.png",
|
"filename" : "LaunchImage@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage@3x.png",
|
"filename" : "LaunchImage@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
"version" : 1,
|
"author" : "xcode",
|
||||||
"author" : "xcode"
|
"version" : 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
@@ -16,13 +16,19 @@
|
|||||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"/>
|
||||||
</imageView>
|
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"></imageView>
|
||||||
</subviews>
|
</subviews>
|
||||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
<constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="3T2-ad-Qdv"/>
|
||||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
<constraint firstItem="tWc-Dq-wcI" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="RPx-PI-7Xg"/>
|
||||||
|
<constraint firstItem="tWc-Dq-wcI" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="SdS-ul-q2q"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="tWc-Dq-wcI" secondAttribute="trailing" id="Swv-Gf-Rwn"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="YRO-k0-Ey4" secondAttribute="trailing" id="TQA-XW-tRk"/>
|
||||||
|
<constraint firstItem="YRO-k0-Ey4" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="duK-uY-Gun"/>
|
||||||
|
<constraint firstItem="tWc-Dq-wcI" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="kV7-tw-vXt"/>
|
||||||
|
<constraint firstItem="YRO-k0-Ey4" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xPn-NY-SIU"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
</viewController>
|
</viewController>
|
||||||
@@ -33,5 +39,6 @@
|
|||||||
</scenes>
|
</scenes>
|
||||||
<resources>
|
<resources>
|
||||||
<image name="LaunchImage" width="168" height="185"/>
|
<image name="LaunchImage" width="168" height="185"/>
|
||||||
|
<image name="LaunchBackground" width="1" height="1"/>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
@@ -43,5 +43,7 @@
|
|||||||
</array>
|
</array>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
</dict>
|
<key>UIStatusBarHidden</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
//import 'common/access_control_filter.dart';
|
||||||
|
import 'package:flutter_native_splash/flutter_native_splash.dart'
|
||||||
|
if (dart.library.html) 'package:flutter_native_splash/flutter_native_splash_web.dart';
|
||||||
|
|
||||||
// import 'package:flutter_localizations/flutter_localizations.dart';
|
// import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'app.dart';
|
import 'app.dart';
|
||||||
import 'life.dart';
|
import 'life.dart';
|
||||||
@@ -7,9 +11,11 @@ import 'mine.dart';
|
|||||||
import 'news.dart';
|
import 'news.dart';
|
||||||
import 'router/router.dart';
|
import 'router/router.dart';
|
||||||
|
|
||||||
//import 'common/access_control_filter.dart';
|
void main() {
|
||||||
|
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
||||||
void main() => runApp(const Bistro());
|
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
|
||||||
|
runApp(const Bistro());
|
||||||
|
}
|
||||||
|
|
||||||
class Bistro extends StatelessWidget {
|
class Bistro extends StatelessWidget {
|
||||||
const Bistro({Key? key}) : super(key: key);
|
const Bistro({Key? key}) : super(key: key);
|
||||||
@@ -64,7 +70,7 @@ class BistroFrame extends StatefulWidget {
|
|||||||
|
|
||||||
class _BistroFrameState extends State<BistroFrame> {
|
class _BistroFrameState extends State<BistroFrame> {
|
||||||
late Widget _body;
|
late Widget _body;
|
||||||
int _index = 0;
|
int _index = 3;
|
||||||
|
|
||||||
static const List<Map<String, dynamic>> _iconList = [
|
static const List<Map<String, dynamic>> _iconList = [
|
||||||
{
|
{
|
||||||
@@ -92,9 +98,15 @@ class _BistroFrameState extends State<BistroFrame> {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
void initData() {
|
@override
|
||||||
|
initState() {
|
||||||
//页面初始化时要干的事
|
//页面初始化时要干的事
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
initialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
void initData() {
|
||||||
_body = IndexedStack(
|
_body = IndexedStack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
const App(),
|
const App(),
|
||||||
@@ -107,6 +119,20 @@ class _BistroFrameState extends State<BistroFrame> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void initialization() async {
|
||||||
|
// This is where you can initialize the resources needed by your app while
|
||||||
|
// the splash screen is displayed. Remove the following example because
|
||||||
|
// delaying the user experience is a bad design practice!
|
||||||
|
print('ready in 3...');
|
||||||
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
|
print('ready in 2...');
|
||||||
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
|
print('ready in 1...');
|
||||||
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
|
print('go!');
|
||||||
|
FlutterNativeSplash.remove();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
initData();
|
initData();
|
||||||
|
|||||||
37
pubspec.lock
@@ -15,6 +15,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.7.2"
|
version: "1.7.2"
|
||||||
|
archive:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: archive
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.2.1"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -216,6 +223,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.5.0"
|
version: "0.5.0"
|
||||||
|
flutter_native_splash:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_native_splash
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.5"
|
||||||
flutter_staggered_grid_view:
|
flutter_staggered_grid_view:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -261,6 +275,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.0"
|
version: "4.0.0"
|
||||||
|
image:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.3"
|
||||||
js:
|
js:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -393,7 +414,7 @@ packages:
|
|||||||
name: permission_handler
|
name: permission_handler
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "9.1.0"
|
version: "9.2.0"
|
||||||
permission_handler_android:
|
permission_handler_android:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -415,6 +436,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.7.0"
|
version: "3.7.0"
|
||||||
|
permission_handler_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: permission_handler_windows
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.1.0"
|
||||||
petitparser:
|
petitparser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -616,6 +644,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.0"
|
||||||
|
universal_io:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: universal_io
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.4"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
89
pubspec.yaml
@@ -52,9 +52,13 @@ dependencies:
|
|||||||
webview_flutter: ^2.8.0
|
webview_flutter: ^2.8.0
|
||||||
flutter_staggered_grid_view: ^0.6.1
|
flutter_staggered_grid_view: ^0.6.1
|
||||||
shared_preferences: ^2.0.13
|
shared_preferences: ^2.0.13
|
||||||
|
|
||||||
|
# http
|
||||||
dio: ^4.0.4
|
dio: ^4.0.4
|
||||||
dio_http_cache: ^0.3.0
|
dio_http_cache: ^0.3.0
|
||||||
|
|
||||||
|
# 启动页
|
||||||
|
flutter_native_splash: ^2.0.5
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@@ -87,6 +91,7 @@ flutter:
|
|||||||
- res/assets/images/dololo.jpg
|
- res/assets/images/dololo.jpg
|
||||||
- res/assets/images/big-dog.jpg
|
- res/assets/images/big-dog.jpg
|
||||||
- res/assets/images/fire.jpg
|
- res/assets/images/fire.jpg
|
||||||
|
- res/assets/images/Splash.png
|
||||||
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||||
@@ -112,3 +117,87 @@ flutter:
|
|||||||
#
|
#
|
||||||
# For details regarding fonts from package dependencies,
|
# For details regarding fonts from package dependencies,
|
||||||
# see https://flutter.dev/custom-fonts/#from-packages
|
# see https://flutter.dev/custom-fonts/#from-packages
|
||||||
|
|
||||||
|
flutter_native_splash:
|
||||||
|
# This package generates native code to customize Flutter's default white native splash screen
|
||||||
|
# with background color and splash image.
|
||||||
|
# Customize the parameters below, and run the following command in the terminal:
|
||||||
|
# flutter pub run flutter_native_splash:create
|
||||||
|
# To restore Flutter's default white splash screen, run the following command in the terminal:
|
||||||
|
# flutter pub run flutter_native_splash:remove
|
||||||
|
|
||||||
|
# color or background_image is the only required parameter. Use color to set the background
|
||||||
|
# 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"
|
||||||
|
|
||||||
|
# Optional parameters are listed below. To enable a parameter, uncomment the line by removing
|
||||||
|
# the leading # character.
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# Specify your branding image for dark mode.
|
||||||
|
#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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
# parameters from above. If the image_dark parameter is specified, color_dark or
|
||||||
|
# background_image_dark must be specified. color_dark and background_image_dark cannot both be
|
||||||
|
# set.
|
||||||
|
# color_dark: "#042a49"
|
||||||
|
# background_image_dark: "assets/dark-background.png"
|
||||||
|
# image_dark: assets/logo_lockup_flutter_vertical_wht.png
|
||||||
|
|
||||||
|
# The android, ios and web parameters can be used to disable generating a splash screen on a given
|
||||||
|
# platform.
|
||||||
|
#android: false
|
||||||
|
#ios: false
|
||||||
|
#web: false
|
||||||
|
|
||||||
|
# The position of the splash image can be set with android_gravity, ios_content_mode, and
|
||||||
|
# web_image_mode parameters. All default to center.
|
||||||
|
#
|
||||||
|
# android_gravity can be one of the following Android Gravity (see
|
||||||
|
# https://developer.android.com/reference/android/view/Gravity): bottom, center,
|
||||||
|
# center_horizontal, center_vertical, clip_horizontal, clip_vertical, end, fill, fill_horizontal,
|
||||||
|
# fill_vertical, left, right, start, or top.
|
||||||
|
#android_gravity: center
|
||||||
|
#
|
||||||
|
# ios_content_mode can be one of the following iOS UIView.ContentMode (see
|
||||||
|
# https://developer.apple.com/documentation/uikit/uiview/contentmode): scaleToFill,
|
||||||
|
# scaleAspectFit, scaleAspectFill, center, top, bottom, left, right, topLeft, topRight,
|
||||||
|
# bottomLeft, or bottomRight.
|
||||||
|
#ios_content_mode: center
|
||||||
|
#
|
||||||
|
# web_image_mode can be one of the following modes: center, contain, stretch, and cover.
|
||||||
|
#web_image_mode: center
|
||||||
|
|
||||||
|
# To hide the notification bar, use the fullscreen parameter. Has no affect in web since web
|
||||||
|
# has no notification bar. Defaults to false.
|
||||||
|
# NOTE: Unlike Android, iOS will not automatically show the notification bar when the app loads.
|
||||||
|
# To show the notification bar, add the following code to your Flutter app:
|
||||||
|
# WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
# SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom, SystemUiOverlay.top]);
|
||||||
|
fullscreen: true
|
||||||
|
|
||||||
|
# If you have changed the name(s) of your info.plist file(s), you can specify the filename(s)
|
||||||
|
# with the info_plist_files parameter. Remove only the # characters in the three lines below,
|
||||||
|
# do not remove any spaces:
|
||||||
|
#info_plist_files:
|
||||||
|
# - 'ios/Runner/Info-Debug.plist'
|
||||||
|
# - 'ios/Runner/Info-Release.plist'
|
||||||
|
|||||||
BIN
res/assets/images/Splash.png
Normal file
|
After Width: | Height: | Size: 900 KiB |
@@ -31,6 +31,9 @@
|
|||||||
|
|
||||||
<title>bistro</title>
|
<title>bistro</title>
|
||||||
<link rel="manifest" href="manifest.json">
|
<link rel="manifest" href="manifest.json">
|
||||||
|
<script src="splash/splash.js"></script>
|
||||||
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="splash/style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- This script installs service_worker.js to provide PWA functionality to
|
<!-- This script installs service_worker.js to provide PWA functionality to
|
||||||
|
|||||||
BIN
web/splash/img/light-background.png
Normal file
|
After Width: | Height: | Size: 900 KiB |
7
web/splash/splash.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
function removeSplashFromWeb() {
|
||||||
|
const elem = document.getElementById("splash");
|
||||||
|
if (elem) {
|
||||||
|
elem.remove();
|
||||||
|
}
|
||||||
|
document.body.style.background = "transparent";
|
||||||
|
}
|
||||||
43
web/splash/style.css
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
body {
|
||||||
|
margin:0;
|
||||||
|
height:100%;
|
||||||
|
background: #000000;
|
||||||
|
background-image: url("img/light-background.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
margin: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
-ms-transform: translate(-50%, -50%);
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.contain {
|
||||||
|
display:block;
|
||||||
|
width:100%; height:100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stretch {
|
||||||
|
display:block;
|
||||||
|
width:100%; height:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover {
|
||||||
|
display:block;
|
||||||
|
width:100%; height:100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body {
|
||||||
|
margin:0;
|
||||||
|
height:100%;
|
||||||
|
background: #000000;
|
||||||
|
background-image: url("img/dark-background.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||