flutter_localizations is not downloaded from pub.dev; it is part of the Flutter SDK, and its pubspec.yaml carries an intl constraint chosen for that SDK release. Up to Flutter 3.44 that constraint was an exact version: 0.17.0 through Flutter 3.7, 0.18.0 in 3.10, 0.18.1 in 3.13 to 3.19, 0.19.0 in 3.22 to 3.29 and 0.20.2 in 3.32 to 3.44. Flutter 3.47 relaxed it to ^0.20.3. Any intl constraint elsewhere in the dependency graph that does not overlap with it makes pub fail:
Because my_app depends on flutter_localizations from sdk which depends on intl ^0.20.2, intl ^0.20.2 is required.
So, because my_app depends on intl ^0.19.0, version solving failed.
Fixes, in the order to try them:
intl with the any constraint, which accepts whatever version flutter_localizations requires:flutter pub add flutter_localizations:"{sdk: flutter}" intl:any
dependencies:
flutter_localizations:
sdk: flutter
intl: any
any is safe here because flutter_localizations already constrains intl; flutter pub deps shows the version that was resolved, for example intl 0.20.3.
If your own code needs a specific intl API, use the version your Flutter release allows and upgrade Flutter when you need a newer intl; the two move together.
If the conflict comes from another package, upgrade that package. easy_localization 3.0.7 allowed intl only up to 0.19.0, so it could not be installed next to Flutter 3.32's 0.20.2; 3.0.7+1 and later allow <0.21.0. If no compatible release exists, file an issue with the package or fork it.
dependency_overrides is the last resort:
dependency_overrides:
intl: ^0.20.3
It forces one intl version onto every package regardless of what they declare. The pub documentation warns that an override outside the range a package claims to support can break your application; with intl that typically surfaces as a compile error inside the overridden package when it uses an API that changed between intl versions. Remove the override as soon as an upgraded package or Flutter release resolves the conflict properly.
Published Oct 9, 2026 · Markdown version