Say I got a bunch of dart scripts in a folder,
Is there anything I can do like import 'foo/*.dart'
?
P.S. What if I got an array of filenames and wanna import those files?
You can mainly use two methods to open all files inside a directory in Python: the os. listdir() function and the glob. glob() function.
You need to import each library individually.
What you can do is to create a library that imports all other libraries and reexports them.
you can then import this one library and get all libraries imported at once.
library all_in_one;
export library1.dart;
export library2.dart;
export library3.dart;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With