我有点困惑。当我添加easy_localization
依赖项并运行 flutter pub get 时,我会给出以下消息:
Because easy_localization >=2.1.0+1 <2.3.4-nullsafety depends on flutter_localizations
any from sdk which depends on path 1.8.0-nullsafety.1,
easy_localization >=2.1.0+1 <2.3.4-nullsafety requires path 1.8.0-nullsafety.1.
我切换到 Flutter 的稳定频道,我有以下 Dart 版本:
Flutter 1.22.6
Dart 2.10.5
这是我的完整 pubspec 文件:
name: demo
description: demo
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: 1.0.0
flutter_bloc: 6.1.1
equatable: 1.2.5
easy_localization: 2.3.3+1
dependency_overrides:
intl: 0.16.1
flutter:
uses-material-design: true
assets:
- assets/translations/
我不明白为什么我有依赖冲突。我也尝试删除 .lock 文件。你有什么想法哪里有问题吗?谢谢。