0

I can't import the firebase_auth package in Flutter. I did everything they said in the installation part (as shown below). Other packages are imported and working properly, but firebase_auth isn't.

name: flash_chat
description: A new Flutter application.

version: 1.0.0+1

environment:
sdk: ">=2.1.0<3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2

  animated_text_kit: ^2.2.0

  firebase_core: ^0.5.0

  firebase_auth_platform_interface: ^2.0.1

  firebase_auth_web: ^0.3.0+1

  firebase_core_platform_interface: ^2.0.0

  cloud_firestore: ^0.14.0+2

  firebase_analytics: ^6.0.0

  firebase_messaging: ^7.0.0

  firebase_auth: ^0.18.0+1

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter:
  uses-material-design: true

assets:
  - images/

And I did the pub get. Can anybody help me?

2
  • What error are you getting? Commented Aug 31, 2020 at 13:05
  • There isn't any error but i can't import it at all. Commented Aug 31, 2020 at 13:14

1 Answer 1

3

These are a few suggested solutions:

  1. Reload your IDE
  2. Delete your pubspec.lock file and re run pub get.
Sign up to request clarification or add additional context in comments.

1 Comment

After endless cleaning and version changing and deleting pubspec.lock, it was the IDE restart which worked for me (on VS Code)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.