Reputation: 189
I need to add flutter_localizations
package to use Arabic language in my application, but when I add it in pubspec.yaml, it gives me the following error:
Because calendar_timeline >=0.6.1 depends on intl ^0.16.1 and every version of flutter_localizations from sdk depends on intl 0.17.0-nullsafety.2, calendar_timeline >=0.6.1 is incompatible with flutter_localizations from sdk.
So, because elderly_app depends on both flutter_localizations any from sdk and calendar_timeline ^0.7.0, version solving failed.
pub get failed (1; So, because elderly_app depends on both flutter_localizations any from sdk and calendar_timeline ^0.7.0, version solving failed.)
This is my pubspec.yaml:
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^1.0.1
calendar_timeline: ^0.7.0
flutter_datetime_picker: ^1.5.0
date_picker_timeline: ^1.2.1
hijri: ^2.0.3
flutter_week_view: ^1.0.0+2
url_launcher: ^5.7.10
It works when I delete the lines under flutter_localizations
like cupertino_icons
and calendar_timeline
Upvotes: 0
Views: 1812
Reputation: 365
Try updating all of your packages to the latest version.
Upvotes: 0
Reputation: 686
According to the above message you should decrease your calendar_timeline
version to lower than 0.6.1
. for example calendar_timeline: 0.6.0
and add this line to pubspec.yaml
file:
dependency_overrides:
intl: ^0.16.0
Upvotes: 2