enlitone97
enlitone97

Reputation: 71

Mapping values are not allowed here. Did you miss a colon earlier?

I am trying to make my first app. I tried to work it out but i couldn't.Can anyone help me please?

-I tried other solutions but i am new to these indentation problems. -I tried yaml validators but no solution.


dependencies: 
flutter:
  sdk: flutter
description: "A new Flutter application."
dev_dependencies: 
flutter_test:
  sdk: flutter
   firebase_auth: ^0.11.1+3
  environment:
    sdk: ">=2.0.0 <3.0.0"
  flutter:
    uses-material-design: true
name: masque
version: 1.0.0+1

Upvotes: 6

Views: 29698

Answers (6)

sueda
sueda

Reputation: 1

Please don't forget to click on the "Pub get" written on the top side, I had the same problem. Clicking "Pub get" will solve all your problems. Good luck.

Upvotes: 0

Ramkesh Yadav
Ramkesh Yadav

Reputation: 1087

Kindly Make Sure You've no White Space Before assets:

Example:

flutter:
  uses-material-design: true

assets:
  - assets/body_builder.jpeg

Upvotes: 2

Nitesh Pandey
Nitesh Pandey

Reputation: 131

Spaces are important in YAML file. So Please remove space before -asset: instead of this

flutter:
  uses-material-design: true
   assets:
     - assets/images/

fix it like this way

flutter:
  uses-material-design: true
  assets:
     - assets/images/

Upvotes: 13

agnes_st
agnes_st

Reputation: 57


In my case I just should have to rename my "assets" folder to some another one. There was this error when I had such code


assets: - assets/image.jpg


I replaced to this:

assets: - images/image.jpg

Upvotes: 3

Gazihan Alankus
Gazihan Alankus

Reputation: 12004

firebase_auth looks out of place. Also there are indentation issues. Can you try this below?

name: masque
version: 1.0.0+1
dependencies: 
  flutter:
    sdk: flutter
  firebase_auth: ^0.11.1+3
description: "A new Flutter application."
dev_dependencies: 
  flutter_test:
    sdk: flutter
flutter:
  uses-material-design: true

Upvotes: 1

AmazingBite
AmazingBite

Reputation: 312

Try this:

name: masque
description: "A new Flutter application."

version: 1.0.0+1

environment:
  sdk: ">=2.0.0 <3.0.0"

dependencies: 
  flutter:
    sdk: flutter

  firebase_auth: ^0.11.1+3
  # You can put packages here

dev_dependencies: 
  flutter_test:
    sdk: flutter

flutter:
  uses-material-design: true
  # You can put assets here

More informations here.

Upvotes: 0

Related Questions