1

Here is my pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  firebase_auth: ^1.0.1
  settings_ui: ^0.6.0
  custom_switch: 0.0.1
  firebase_core: ^1.0.2
  path_provider: ^2.0.1
  another_flushbar: ^1.10.17
  cloud_firestore: ^1.0.2
  image_picker: ^0.7.4
  cupertino_icons: ^1.0.2

profile.dart package import section

I am not able to import image_picker.dart and so I can't use it's function.

I have run flutter pub get command.

What could be the problem?

2 Answers 2

2

change your pubspec.yaml to this

dependencies:
  flutter:
    sdk: flutter
  firebase_auth: 
  settings_ui: ^0.6.0
  custom_switch: 0.0.1
  firebase_core: 
  path_provider: ^2.0.1
  another_flushbar: ^1.10.17
  cloud_firestore: 
  image_picker: 
  cupertino_icons: ^1.0.2

let me know if this work.

2
  • So, if we don't give any version then flutter automatically get best ? Mar 31, 2021 at 7:53
  • 1
    you get error of firebase version. when you remove the version code then flutter automatically get the version. which is compatible with the other packages. Mar 31, 2021 at 8:47
0

You forgot the add this ^

 image_picker: ^0.7.4
1
  • I have added but still same problem Mar 31, 2021 at 6:22

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.