Console dart application

21 views
Skip to first unread message

Steepe Hare

unread,
Apr 26, 2021, 2:38:37 AM4/26/21
to Flutter Development (flutter-dev)
Is it possible to write a console dart application (without any GUI) that uses third-party package (from pub.dev) and can be run as: dart <module_name>.dart ?

Darius Roberts

unread,
Apr 26, 2021, 4:48:08 PM4/26/21
to Flutter Development (flutter-dev)
Yes. Reference: https://dart.dev/tutorials/server/cmdline

Further, you can even do this with Flutter-based dependencies. Just don't use flutter main(). 
I'm not sure where you want to run it, but you can, for example, compile for alternative platforms, such as raspberry pi. https://github.com/ardera/flutter-pi

Steepe Hare

unread,
Apr 29, 2021, 1:47:57 PM4/29/21
to Flutter Development (flutter-dev)
Thank you, great link
Reply all
Reply to author
Forward
0 new messages