How can I solve this here is my pubspec.yaml
CodePudding user response:
You should remove the space between flutter_native_splash: and create.
The right command is this one: flutter pub pub run flutter_native_splash:create
CodePudding user response:
There could be something wrong with the formatting of your pubspec.yaml
. Here is a working one:
name: test_app
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0 1
environment:
sdk: ">=2.13.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
dev_dependencies:
flutter_test:
sdk: flutter
# Use the correct version for your app, here I use `any` for demonstration
flutter_native_splash: any
flutter_native_splash:
color: "#42a5f5"
flutter:
uses-material-design: true
You can try pasting your other package in this template, or use another method guided in the package's documentation, which is to create a flutter_native_splash.yaml
file at the project's root:
flutter_native_splash.yaml
's content
flutter_native_splash:
color: "#42a5f5"