I don't know what is happening but I m not able to insert image through Asset image using pubspec.yaml file.Pub get is not loading dependencies.
Kindly please help me out. I am running a flutter project.
Here is the code of pubspec.yaml file
name: mi_card_flutter
description: A new Flutter application.
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
images/khushi.jpg
Error is :
Error detected in pubspec.yaml: Expected "assets" to be a list, but got images/ (String). Please correct the pubspec.yaml file at C:\Users\khush\AndroidStudioProjects\mi_card_flutter\pubspec.yaml Process finished with exit code 1