这里java说的是flutter_native_splash插件,非原生
1. pubspec.yaml添加插件
dependencies:
flutter_native_splash: ^2.4.6
#启动样式
flutter_native_splash:
color: "#FF0000"
image: assets/images/test.png2.终端pub get
3.执行插件代码植入指令
flutter pub run flutter_native_splash:create
看到对勾就算完成了。
4. 清除,运行
flutter clean
flutter run5. 此时此刻的启动界面:

低版本以及杂交flutter环境的坑:
不出意外就是出意外了,等不到到 5 的出现
最多见到这种:

解决方法:

最后:pub run
评论 0
友善交流,让讨论变得更有价值。