启动页
安装flutter_native_splash
使用命令
flutter pub add flutter_native_splash
设定启动页
在文件pubspec.yaml
中添加下面的代码
flutter_native_splash:
# 背景色
color: "#ffffff"
# 背景图片
background_image: "assets/background.png"
# 中心图片,这里应该存放App图标
image: "assets/logo.png"
最后执行下面的命令:
flutter pub get
flutter pub run flutter_native_splash:create