31.1 Flutter App Creation

To begin a new app simply create a folder of the name that you want to use for the app, and then ask flutter to create the app skeleton.

mkdir button
cd button
flutter create .

A skeleton and fully functional dart program is found in lib/main.dart. The file pubspec.yaml holds general information about the app (name, description, publish_to, and version), the development environment, dependencies (including dev_dependencies required just for development), and Flutter configurations.

To then build and run the app in debug mode:

flutter run -d linux

If you see a Exception: No Linux desktop project configured. then the following should assist:

$ flutter create --platforms=windows,macos,linux .

See https://flutter.dev/desktop#add-desktop-support-to-an-existing-flutter-app for details.



Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.