依赖冲突

Dependency conflict

我有点困惑。当我添加 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 文件。你知道哪里有问题吗?谢谢

很简单,像这样去掉依赖版本就可以了

  image_picker: 
  intl: 
  http: ^0.12.2

会自动选择需要的版本