TLDR:如何为整个应用程序强制使用特定的Flutter包(库)版本?
假设我的pubspec.yaml
文件中有以下依赖项:
dependencies:
flutter:
sdk: flutter
datetime_picker_formfield: 0.4.3
date_utils: 0.1.0+3
intl: 0.15.8
这给了我一个版本冲突错误:
Because flutter_app depends on date_utils 0.1.0+3
which depends on intl ^0.16.0, intl ^0.16.0 is required.
但是当我们将 intl 更改为时,intl: 0.15.8
我们得到:
Because flutter_app depends on datetime_picker_formfield 0.4.3
which depends on intl ^0.15.8, intl ^0.15.8 is required.
如何强制intl: 0.16.0
两者:datetime_picker_formfield
和date_utils
包?