jonbhanson / flutter_native_splash

Automatically generates native code for adding splash screens in Android and iOS. Customize with specific platform, background color and splash image.
https://pub.dev/packages/flutter_native_splash
MIT License
1.36k stars 215 forks source link

dart run run flutter_native_splash:create error! #672

Closed omergunaydin closed 8 months ago

omergunaydin commented 8 months ago

⚠️ The parameter "cupertino_icons" was found in your flutter_native_splash config, but "cupertino_icons" is not a valid flutter_native_splash parameter. How can i fix it ?

alitalaee commented 8 months ago

Hello i had the same Issue and it happend because of my wrong

Wrong pubspec.yaml

flutter_native_splash:
  ios: true
  android: true
  color: "#ffffff"
  image: "assets/splash.png"
  cupertino_icons: ^1.0.2 
  webview_flutter: ^4.7.0

cupertino_icons be a subcontent of native_splash

Right pubspec.yaml

Screenshot 1402-12-26 at 7 55 47 in the evening

I hope it will help

jonbhanson commented 8 months ago

Yes, @alitalaee has identified the problem. So, in his example it would be corrected by moving cupertino_icons to be under the dependencies section instead of under the flutter_native_splash section.

If you have more questions, you should read about how yaml files work.