dart-json-mapper
dart-json-mapper copied to clipboard
Dependency conflict: incompatible with latest flutter_localizations due to intl version mismatch
When integrating dart_json_mapper into a Flutter project that utilizes the official flutter_localizations package, a dependency conflict arises due to incompatible versions of the intl package.
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
Dependency Conflict Details
dart_json_mapper(versions 2.2.15 and 2.2.16) depends onintlversion ^0.20.2.flutter_localizationsfrom the latest Flutter SDK (v3.29.3) requiresintlversion ^0.19.0.
This results in the following error during dependency resolution:
Because dart_json_mapper >=2.2.15 depends on intl ^0.20.2 and every version of flutter_localizations from sdk depends on intl 0.19.0, dart_json_mapper >=2.2.15 is incompatible with flutter_localizations from sdk.
Impact
This incompatibility prevents the use of dart_json_mapper > 2.2.14 in Flutter projects that require localization support via flutter_localizations.
Suggested Resolution
To resolve this issue, consider updating dart_json_mapper to depend on a version of intl that is compatible with flutter_localizations. Alternatively, providing guidance on how to manage this dependency conflict would be beneficial for developers facing this issue 🚀