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 .
source share