How to specify dependency_overrides in pubspec.yaml?

I am working with the latest version of angular.dart, and mine pubspec.yamllooks something like this:

name: angularApp
dependencies:
  angular:
    git:  'git@github.com:angular/angular.dart'
  third_party_angular_plugin: any

The problem third_party_angular_plugindepends on the stable version angular.dart. I tried to specify the following:

name: angularApp
dependencies:
  angular:
    git:  'git@github.com:angular/angular.dart'
  third_party_angular_plugin: any
dependency_overrides:
  angular:
    version: ">=0.9.10"

But this causes a strange error: Bad State: No elements dart:core List.single ....

How can I override third_party_angular_pluginthe angular dependency for my application?

+1
source share
1 answer

versionis not a separate subkey, as in the example on the Pub Dependencies page , the right format is as follows:

name: angularApp
dependencies:
  angular:
    git:  'git@github.com:angular/angular.dart'
  third_party_angular_plugin: any
dependency_overrides:
  angular: ">=0.9.10"
+1
source

Source: https://habr.com/ru/post/1547683/


All Articles