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.)
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
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.
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