The packages firebase_auth and flutter_localizations cause the following error. Is there a way to fix this?
Because firebase_auth >=0.20.1 <0.21.0-1.0.nullsafety.0 depends on firebase_auth_web ^0.3.3 and no versions of firebase_auth match >0.20.0+1 <0.20.1, firebase_auth >0.20.0+1 <0.21.0-1.0.nullsafety.0 requires firebase_auth_web ^0.3.3.
And because firebase_auth 0.20.0+1 depends on firebase_auth_web ^0.3.2+6, firebase_auth >=0.20.0+1 <0.21.0-1.0.nullsafety.0 requires firebase_auth_web ^0.3.2+6.
And because firebase_auth_web >=0.3.0-dev.1 <0.4.0-1.0.nullsafety.0 depends on intl ^0.16.1 and every version of flutter_localizations from sdk depends on intl 0.17.0, firebase_auth >=0.20.0+1 <0.21.0-1.0.nullsafety.0 is incompatible with flutter_localizations from sdk.
So, because geschenk depends on both flutter_localizations any from sdk and firebase_auth ^0.20.0+1, version solving failed.
pub get failed (1; So, because geschenk depends on both flutter_localizations any from sdk and firebase_auth ^0.20.0+1, version solving failed.)
Because firebase_auth >=0.18.4 depends on firebase_auth_web ^0.3.2+2 which depends on intl ^0.16.1, firebase_auth >=0.18.4 requires intl ^0.16.1. And because every version of flutter_localizations from sdk depends on intl 0.17.0-nullsafety.2, firebase_auth >=0.18.4 is incompatible with flutter_localizations from sdk.
Migrate your flutter app to Android X. Step 2: Import provider package in your pubspec.yaml file and run flutter pub get to upgrade the dependencies. Step 3: make a provider directory in your lib folder and create a file having name auth_provider. Step 4: import the foundation.dart class.
First import firebaseAuth.dart i.e: import ‘package:firebase_auth/firebase_auth.dart’; Create a verification id variable of type String.
//Starts the phone number verification process for the given phone number. //Either sends an SMS with a 6 digit code to the phone number specified, or sign's the user in and [verificationCompleted] is called. In this above method, we verify the phone number with OTP send by the firebase to the user phone number.
I managed to fix this issue by adding the following lines to override the dependencies:
dependency_overrides:
intl: ^0.17.0-nullsafety.2
My dependencies now look like this:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
firebase_core: ^0.7.0
firebase_auth: ^0.20.1
dependency_overrides:
intl: ^0.17.0-nullsafety.2
You can try this:
dependencies:
firebase_auth_web: 0.3.3
firebase_auth: ^0.20.1
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl:^0.17.0-nullsafety.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With