Environment Setup
“Cross-platform” vs. “Native” Development
This class uses Flutter - a toolset for cross-platform app development maintained by Google. Cross-platform in this context means developing for both Android and iOS, though Flutter is capable of creating web and desktop applications as well.
Normally if you were writing an iOS app, you would use the Apple tool Xcode and the Swift programming language. If you were writing an Android app, you would use Android Studio and the Kotlin or Java languages. These are the so-called native languages and tools published by the Apple and Android companies to create apps for their devices.
The Flutter Software Development Kit (SDK) uses the Dart programming language. The process for creating a cross-platform app in Flutter is simple conceptually:
- You write your mobile app in the Dart language using Flutter SDK libraries to specify the user interface and program logic.
- You tell the Flutter SDK to compile and run your mobile app on a device.
- Flutter SDK automatically translate your Flutter code into native code using the native development tools.
Dart is just another programming language that looks like a combination of Python and Java. The “magic” of cross-platform development (and the headache) is in the automatic translation that Flutter does for you between the Dart code and the native code.
To get started, you need the right tools.
Install the tools
You will be required to read a lot of official Flutter documentation in this course. Official documentation is something that all professional software engineers use. It requires that you pay attention to what you are reading. Often the official documentation has very precise steps and, if you skip over one, you severely hamper what you are trying to do.
Preparation
- Flutter and the native tools can require up to 20 GB of disk space, so make sure you have room on your hard disk.
- The complete environment setup will also take a while and should not be interrupted. Make sure you’ve got an hour and plenty of charge to let everything run.
- Find your computer’s
%HOME%
folder for your user account.- On Windows, your
%HOME%
folder isC:\Users\<your_username>
, e.g.,C:\Users\laymanl
- On Mac, your
%HOME%
folder is/Users/<your_username>
, e.g.,/Users/laymanl
- On Linux, your
%HOME%
folder is/home/<your_username>
, e.g.,/home/laymanl
- On Windows, your
- You should get comfortable using the “console” or “terminal” application on your computer.
- Mac - The program is called Terminal: https://www.makeuseof.com/tag/mac-terminal-commands-cheat-sheet/
- Windows - Use the Command Prompt, Powershell, or the Terminal app from the Windows Store. They all work basically the same.
Installation
Go to the appropriate link below and follow the instructions for your operating system.