Conflict with using firebase_auth and flutter_localizations packages
Asked Answered
P

3

9

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.)
Provincial answered 20/2, 2021 at 12:50 Comment(0)
P
24

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
Provincial answered 22/2, 2021 at 14:29 Comment(2)
life saviour :)Lagasse
What mean this message 'Warning: You are using these overridden dependencies:'Specimen
B
3

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

Barncard answered 22/2, 2021 at 9:1 Comment(0)
M
0

Remove both

  1. firebase_auth
  2. intl

dependencies

and add them again

  • flutter pub add firebase_auth
  • flutter pub add intl
Multiplex answered 7/4, 2023 at 20:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.