Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter_localizations from sdk depends on intl 0.17.0 and fstore depends on intl ^0.16.1, flutter_localizations from sdk is forbidden

Because every version of flutter_localizations from SDK depends on intl 0.17.0 and fstore depends on intl ^0.16.1, flutter_localizations from SDK is forbidden.

So, because fstore depends on flutter_localizations any from SDK, version solving failed. pub get failed (1; So, because fstore depends on flutter_localizations any from sdk, version solving failed.)

like image 317
EKRAMUL Avatar asked Mar 04 '21 13:03

EKRAMUL


2 Answers

This is happening because flutter_localizations need intl: ^0.16.1 while the last version needed intl: ^0.17.0-nullsafety.2

By overriding the existing dependency we can resolve this issue

Adding this to pubspec.yaml solved it:

dependency_overrides:
   intl: ^0.17.0-nullsafety.2
like image 81
Paresh Mangukiya Avatar answered Sep 17 '22 17:09

Paresh Mangukiya


You can check this link it helped me a lot

https://medium.com/swlh/convert-your-flutter-app-to-enjoy-null-safety-69632aa62d7a

Although it was claimed that null safety is an opt-in feature, a fresh install still somehow forced me to upgrade my dependency. Anyway, I was glad that the error message was very useful and the change seemed easy. So, I replaced the line:

intl: ^0.16.1

with

intl: ^0.17.0-nullsafety.2

Now my % flutter pub get was clean and the app worked fine without any changes. That’s great! For any kind of migration exercise, it is always a good idea to start with a working baseline.

like image 5
H Amr Avatar answered Oct 06 '22 11:10

H Amr