我正在使用最新版本的angular.dart,我的pubspec.yaml
看起来有点像这样:
name: angularApp
dependencies:
angular:
git: 'git@github.com:angular/angular.dart'
third_party_angular_plugin: any
问题是third_party_angular_plugin
取决于angular.dart
的稳定版本。我试着指定如下:
name: angularApp
dependencies:
angular:
git: 'git@github.com:angular/angular.dart'
third_party_angular_plugin: any
dependency_overrides:
angular:
version: ">=0.9.10"
但它引发了一个奇怪的错误Bad State: No elements dart:core List.single ....
如何覆盖third_party_angular_plugin
对我应用的角度的依赖性?
答案 0 :(得分:1)
version
不是单独的嵌套密钥,根据Pub Dependencies页面上的示例,正确的格式为:
name: angularApp
dependencies:
angular:
git: 'git@github.com:angular/angular.dart'
third_party_angular_plugin: any
dependency_overrides:
angular: ">=0.9.10"