-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathflutter_native_splash.yaml
177 lines (150 loc) · 8.67 KB
/
flutter_native_splash.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
flutter_native_splash:
color: "#ffffff"
android: true
web: true
image: "splash/splash.png"
# flutter_native_splash:
# 该锯生成原生代码来自定义 Flutter 默认白色原生闪屏界面的背景色和闪屏图像。
# 自定义下面的参数,然后在命令行终端运行下面的命令:
# flutter pub run flutter_native_splash:create
# 要恢复为 Flutter 默认的白色闪屏界面,运行下面的命令:
# flutter pub run flutter_native_splash:remove
# 只有 color 或 background_image 是必需的参数。使用 color 将闪屏界面的背景设置为单色。
# 使用 background_image 可将 png 图像设置为闪屏界面的背景。该图像会被拉伸以适应应用大小。
# color 和 background_image 不能同时设置,只有一个会被使用。
# color: "#42a5f5"
#background_image: "assets/background.png"
# 以下是可选的参数。去掉注释前面的 #可使参数起作用。
# image 参数允许你指定在闪屏界面使用的图像。它必须是 png 文件,且应该是用于4倍像素密度的大小。
#image: assets/splash.png
# 该属性允许你指定图像作为商标在闪屏界面显示。它必须是 png 文件。现在它只支持 Android 和 iOS 。
#branding: assets/dart.png
# 为黑暗模式指定商标图像
#branding_dark: assets/dart_dark.png
# 要将商标图像放置在界面底部,可以使用 bottom 、 bottomRight 和 bottomLeft 。如果未指定或者指定了其它值,使用默认值 bottom 。
# 确保该内容模式值与 android_gravity 值 和 ios_content_mode 值不相似。
#branding_mode: bottom
# color_dark 、 background_image_dark 和 image_dark 用于设备在黑暗模式时设置背景色和图像。
# 如果没有指定,应用会使用上面的参数。如果指定了 image_dark ,必须要指定 color_dark 或 background_image_dark 。
# color_dark 和 background_image_dark 不能同时设置。
#color_dark: "#042a49"
#background_image_dark: "assets/dark-background.png"
#image_dark: assets/splash-invert.png
# android 、 ios 和 web 参数可用于不为对应的平台生成闪屏界面。
#android: false
#ios: false
#web: false
# 可用 android_gravity 、 android_gravity 、 ios_content_mode 和 web_image_mode 来设置闪屏图像的位置。默认是居中。
#
# android_gravity 可以是以下 Android Gravity 其中之一 (查看
# 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 或 top 。
#android_gravity: center
#
# ios_content_mode 可以是以下 iOS UIView.ContentMode 其中之一 (查看
# https://developer.apple.com/documentation/uikit/uiview/contentmode): scaleToFill 、
# scaleAspectFit 、 scaleAspectFill 、 center 、 top 、 bottom 、
# left 、 right 、 topLeft 、 topRight 、 bottomLeft 或 bottomRight 。
#ios_content_mode: center
#
# web_image_mode 可以是以下模式其中之一:center 、 contain 、 stretch 和 cover 。
#web_image_mode: center
# 要隐藏通知栏,使用 fullscreen 参数 。在 Web 上不起作为,因为 Web 没有通知栏。默认是 false 。
# 注意: 不像 Android 、 iOS 当应用加载时不会自动显示通知栏。
# 要显示通知栏,在 Flutter 应用中添加以下代码:
# WidgetsFlutterBinding.ensureInitialized();
# SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom, SystemUiOverlay.top]);
#fullscreen: true
# 如果改变了 info.plist 的名字,可以使用 info_plist_files 指定对应的文件名。
# 只需移除下面三行前面的 # 字符,不要移除任何空格:
#info_plist_files:
# - 'ios/Runner/Info-Debug.plist'
# - 'ios/Runner/Info-Release.plist'
# 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: "#42a5f5"
#background_image: "assets/background.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/splash.png
# The branding 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 < v12 and iOS.
#branding: assets/dart.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.
#branding_mode: bottom
# The color_dark, background_image_dark, image_dark, branding_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/splash-invert.png
#branding_dark: assets/dart_dark.png
# Android 12 handles the splash screen differently than previous versions. Please visit
# https://developer.android.com/guide/topics/ui/splash-screen
# Following are Android 12 specific parameter.
# android_12:
# The image parameter sets the splash screen icon image. If this parameter is not specified,
# the app's launcher icon will be used instead.
# Please note that the splash screen will be clipped to a circle on the center of the screen.
# App icon with an icon background: This should be 960×960 pixels, and fit within a circle
# 640 pixels in diameter.
# App icon without an icon background: This should be 1152×1152 pixels, and fit within a circle
# 768 pixels in diameter.
# image: assets/Feh.png
# App icon background color.
#icon_background_color: "#111111"
# The image_dark parameter and icon_background_color_dark set the image and icon background
# color when the device is in dark mode. If they are not specified, the app will use the
# parameters from above.
#image_dark: assets/android12splash-invert.png
#icon_background_color_dark: "#eeeeee"
# 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 effect 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'