skip to Main Content

Does anyone have a solution for this?

flutter image

I typed all the following commands in the terminal but nothing.

"flutter package get "

"flutter packages upgrade"

"flutter pub get"

"flutter pub add flutter_pin_code_fields".
I added "
flutter_pin_code_fields: ^2.2.0
I added "flutter_pin_code_fields: ^2.2.0" to the dependencies in File < pubspec.yaml > , saved and restarted the IDE, which is VScode.

2

Answers


  1. If you add a package by this command

    flutter pub add flutter_pin_code_fields
    

    then you don’t need to do this manually in your file pubspec.yaml like this

    dependencies:
      flutter_pin_code_fields: ^2.2.0
    

    After running a command or adding manually in pubspec.yaml, do this:

    flutter clean
    flutter pub get
    flutter run
    
    Login or Signup to reply.
  2. In "pubspec.yaml": (manually)

    • ✔ You have to add the package to
    dependencies:
      package_name: vesion
    
    • ✖ And not to
    dev_dependencies: 
      package_name: version
    

    In terminal:

    • you can add packages to dependencies through this command:
    flutter pub add package_name
    
    • then, refreshing dependencies if needed:
    flutter clean
    flutter pub get
    flutter run
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search