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.28k stars 200 forks source link

dart run run flutter_native_splash:create error! #672

Closed omergunaydin closed 1 month ago

omergunaydin commented 2 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 2 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 2 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.