Added english_words and i have a problem in the pubspec.yaml file

I’m trying to create a new project from and i added a dependency english_words in the pubspec.yaml file. When i run my app i get this error:

[startup_namer] flutter pub get
Error detected in pubspec.yaml:
Error on line 32, column 3: Expected a key while parsing a block mapping. ╷

32 │ cupertino_icons: ^0.1.3

│ ^

Please correct the pubspec.yaml file at C:\Projetos\startup_namer\pubspec.yaml
exit code 1

I searched in the Internet but i still didn’t get answer.
How can i solve this issue? Below my code

i did in the project: flutter pub get

I tried to put yaml and main.dart files but i’m a new user and i can’t to put more two links.

Copy and paste your pubspec.yaml code. You don’t need to link it. Remember to format it using the </> preformatted text button in the message editor menu. Once we can see the pubspec we could help you fix it.
Please notice that in yaml files indentation has syntactic value, so probably you got it wrong in the line you added for the new dependency. You could try to fix it, and if you don’t succeed then paste it here.

My yaml file without link and any comments

name: startup_namer
description: A new Flutter project.
version: 1.0.0+1
  sdk: ">=2.7.0 <3.0.0"
    sdk: flutter
cupertino_icons: ^0.1.2            
english_words: ^3.1.5

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.

    sdk: flutter

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

# The following section is specific to 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/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see

  # For details regarding adding assets from package dependencies, see

  # 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,

First, the issue in your .yaml, as I suspected you missed the correct indentation for the two dependencies:

    sdk: flutter
cupertino_icons: ^0.1.2            
english_words: ^3.1.5

should really be instead:

    sdk: flutter
  cupertino_icons: ^0.1.2            
  english_words: ^3.1.5

Second, a more general consideration: programming is very much in the details. The smallest, insignificant detail can crash your code or make it behave in unexpected ways. So, programming is to care about details. Also it is making efforts to understand what you still don’t. I had to re-format your yaml snippet, because you didn’t care about my suggestion to use the </> Preformatted text button, but instead you used the " Blockquote button, which produced a badly formatted snippet.
As I told you, in yaml files indentation has syntactic meaning. So it was essential to see the indentations in your file, to find the error in it. Which I also suggested you to check: wrong indentation in your new deps.
I encourage you to always ask when you don’t understand someone else suggestion, and make efforts in fixing the errors you’ll find along the way. There will plenty of them, and you really need to learn the skill of debugging your code. That is mostly paying attention to details, and try, until you fix it.
Don’t be scared to ask when you don’t know, but do not just wait for others to solve your problems. This is not going to last forever. :slight_smile:

Thank you for this above. I find for answer in the net. But i didn’t know that yaml file was susceptible to indentation. Now worked fine. Thank you @patrick_dm

:slight_smile:. Glad you fixed that. You are welcome. I know how hard can be, to look for answers when you aren’t even sure what is the correct question! We’ve all been in there, and learned the hard way, with hours of frustration and despair :wink: