0
  1. In my project import package:flare_flutter/flare_actor.dart'; is not importing?

  2. FlareActor is showing error.

  3. I have referred to this video: Flare and Flutter Quick Start

  4. When I am doing flutter run, I get this error:

    error on line 26 ,columns 2 of pubspec.yaml: expected a key while parsing a b
    
        |
     26 | cupertino_icons:'0.1.2'
        | ^
    
    In yaml dependencies 
    dependencies:
      flutter:
        sdk: flutter
    flare_flutter: '^1.7.4'
    flare_dart: '^2.4.0' 
    cupertino_icons: '^0.1.2'
    

How can I fix this?

Martin Evans
  • 45,791
  • 17
  • 81
  • 97

1 Answers1

1

I believe you're making an indentation error. "pubspec.yaml" file which uses the yaml language uses indentations just like in python. Note that the indentation rules are different for python and yaml, yaml uses 2 spaces of indentation. The dependencies you add should be 2 spaces after the start line.

So the correct format should look like:

dependencies:
  flutter:
    sdk: flutter
  flare_flutter: '^1.7.4'
  flare_dart: '^2.4.0' 
  cupertino_icons: '^0.1.2'
Ali Türkay Avci
  • 1,038
  • 12
  • 12