londonappbrewery / Flutter-Course-Resources

Learn to Code While Building Apps - The Complete Flutter Development Bootcamp
https://www.appbrewery.co
10.29k stars 3.07k forks source link

i don't understand what is going on #39

Open folakemiariyo opened 4 years ago

folakemiariyo commented 4 years ago

i am having issues in my pubspec.yaml file

folakemiariyo commented 4 years ago

name: personal_expense description: A new Flutter project.

The following line prevents the package from being accidentally published to

pub.dev using pub publish. This is preferred for private packages.

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

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.

In Android, build-name is used as versionName while build-number used as versionCode.

Read more about Android versioning at https://developer.android.com/studio/publish/versioning

In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.

Read more about iOS versioning at

https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

version: 1.0.0+1

environment: sdk: ">=2.7.0 <3.0.0"

dependencies: flutter: sdk: flutter intl: ^0.16.1

The following adds the Cupertino Icons font to your application.

Use with the CupertinoIcons class for iOS style icons.

cupertino_icons: ^0.1.3

dev_dependencies: flutter_test: sdk: flutter

For information on the generic Dart part of this file, see the

following page: https://dart.dev/tools/pub/pubspec

The following section is specific to Flutter.

flutter:

The following line ensures that the Material Icons font is

included with your application, so that you can use the icons in

the material Icons class.

uses-material-design: true

To add assets to your application, add an assets section, like this:

assets:

WojuadeAA commented 4 years ago

have been able to solve the issue?

WojuadeAA commented 4 years ago

if you haven't what is the error message on the pubspec.yaml file?

yusufnacar commented 4 years ago

I think you just changed assets area but it is not clear yet what is the problem exactly ? Can you try send a screenshot with error message ?

mandata5010 commented 3 years ago

Hi, I probably have a problem with the pubspec.yaml file too? Could you help, I am a new user and I'm trying to learn everything? Included attachments (2)? code problem code Please, help me !

shazlycode commented 3 years ago

Hi Could you please send pubspec.yaml screen shot to be able to help you.ThanksOn 1 Jan 2021 8:08 pm, mandata5010 notifications@github.com wrote: Hi, I probably have a problem with the pubspec.yaml file too? Could you help, I am a new user and I'm trying to learn everything? Included attachments (2)?

Please, help me !

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.

mandata5010 commented 3 years ago

Hi, did you mean this? Also included is a pub? Thank you. pubspec pubget

prateek-aher commented 3 years ago

The code shown in your pubspec.yaml file Shouldn't be there in the first place. My guess is, you copied the code and pasted it in the pubspec.yaml file when you should have pasted it in main.dart. The original code in the YAML file got overwritten.

It is throwing an error because the YAML file has got unrecognized code in it.

This what pubspec.yaml file looks originally. You can copy-paste it there.

name: Quotes
description: Read a list of quotes frome famous authors.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment:
  sdk: ">=2.7.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: ^1.0.0

dev_dependencies:
  flutter_test:
    sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - images/

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages
ladunjexa commented 2 years ago

The suggested syntax for YAML files is to use 2 spaces for indentation, in your case it probably won’t work otherwise, then check your pubspec.yaml for this case