How to create libraries for Dart?

How to create libraries using Dart?

I want to start porting some of the JavaScript libraries (and other languages) that I created for Dart.

+6
source share
1 answer

Just put this in your library file (first place):

library mylibraryname; 

Then you can import this library with:

 import "path/to/mylibraryname.dart"; 

Other options are available, such as part , which act as include.

For a more in-depth lesson, I recommend you this blog post from Dartwatch .

+8
source

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


All Articles