...
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
http: ^0.13.6
local_auth: ^2.1.6
rxdart: ^0.27.7
bloc: ^8.1.2
google_fonts: ^4.0.4
flutter_secure_storage: ^8.0.0
flutter_appauth: ^6.0.0
flutter_bloc: ^8.1.3
flutter_spinkit: ^5.2.0
cached_network_image: ^3.2.3
just_audio: ^0.9.33
just_audio_background: ^0.0.1-beta.10
audio_video_progress_bar: ^1.0.1
sliding_up_panel: ^2.0.0+1
flutter_native_splash: ^2.3.0
...
flutter_native_splash:
web: false
color: "#ffffff"
color_dark: "#ffffff"
image: "assets/images/Minda.png"
image_dark: "assets/images/Minda.png"
android_12:
color: "#ffffff"
color_dark: "#ffffff"
image: "assets/images/Minda.png"
image_dark: "assets/images/Minda.png"
使用flutter_native_splash创建启动画面的命令:
flutter clean && flutter pub get && flutter pub run flutter_native_splash:create
当应用程序构建时,启动屏幕仅显示白色/黑色屏幕,没有图像。如何使它显示图像?
1条答案
按热度按时间gev0vcfq1#
在项目文件中创建
flutter_native_splash.yaml
并在下面的代码中运行你也可以使用这个(可选)