31.3 Flutter App Creation

20220319 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. Here we create an app called button:

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.

If your Android device is connected to the computer then you can build, install, and run the app on the device with run:

flutter run

Check what devices are available with:

flutter devices

To build for and run on a Linux desktop see Section 31.16.

Your donation will support ongoing availability 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-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0