skip to Main Content

iam Working on Flutter (android studio hedgehog).

i dont know how to add dependencies and cant find any option of it.
i need to download/add "firebase_core"

i’ll be glad to hear from you guys.

-saw tutorials , but they were using visual studio code
-saw forums but didnt find

2

Answers


  1. If you want to add dependencies like ‘firebase_core’ Then you need to follow the below steps:

    1. Open the pubspec.yaml file in your flutter project.

    2. You need to add the dependencies like:

      dependencies:
        flutter:
          sdk: flutter
        firebase_core: ^3.3.0  # replace with the latest version.
      
    3. After that run flutter pub get command in your terminal or you will get an option in pubspec.yaml file in android studio for pub get.

    Login or Signup to reply.
  2. Open terminal in android studio or vs code and run

    flutter pub add firebase_core
    

    It will automatically add "firebase_core" dependency in your project with right version.

    Bonus: you can add multiple package in your project with right version by following command.

    flutter pub add package1,package2,package3 
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search