How to add dart package from github to my project?

So, I have a dart program, and I want to add the dart package from github, and not the usual way to add packages using the IDE package manager, since the github version has the latest code.

What will be the process for this?


It works for me in the real world.

name: game description: A sample web application dependencies: browser: any three: git: ref: master url: 'git://github.com/threeDart/three.dart.git' 
+6
source share
1 answer

You can add a dependency to your pubspec.yaml file that points directly to the git URL.

For example, this pubspec.yaml file adds a package kitten dependency:

 name: My Dart program description: Blah dependencies: kittens: git: git://github.com/munificent/kittens.git 

See pubspec.yaml docs for more information.

+7
source

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


All Articles