1、项目根目录执行
flutter pub add flutter_native_splash
2、会在pubspec.yaml 中添加
flutter_native_splash: ^2.0.5
3、pubspec.yaml 文件中增加
flutter_native_splash: color: "#17016D"
增加 color 或 background_image , 两个不能同时存在,否则create失败
4、根目录执行
flutter pub run flutter_native_splash:create
之后运行项目,开机白屏就会更改为color 或设置的background_image(图片需png格式)
若想删除开机页设置,根目录执行remove
flutter pub run flutter_native_splash:remove