Getting and installing the stuff you need to program Flutter apps
- Download this file containing all the Flutter program examples from Dummies.com.
The downloaded file is a
.zip
archive file.Most web browsers save files to the
Downloads
directory on the computer's hard drive. But your browser may be configured a bit differently. One way or another, make note of the folder containing the downloaded fileFlutterForDummies_Listings.zip
. - Extract the contents of the downloaded file to a place on your computer's hard drive.
- Visit Flutter's Install Page and download the Flutter SDK.
Choose a version of the software that matches your operating system (Windows, Macintosh, or whatever).
- Extract the contents of the downloaded file to a place on your computer's hard drive.
The aforementioned contents is actually a directory full of stuff. The directory's name is
flutter
. Put your newflutter
directory in a place that isn't protected with special privileges. For example, if you try extracting theflutter
directory inside thec:\program
files directory, Windows displays its User Account Control dialog box and asks for confirmation. Don't put theflutter
directory inside a place like that.Many Flutter programmers like to put the
flutter
directory inside the home directory. This home directory usually contains aDocuments
directory, aDownloads
directory, and lots of other stuff. After you extract the downloaded file's content, the home directory should have a brand-newflutter
directory.You don't have to extract the
flutter
directory right inside your home directory, but it's the simplest, most reliable thing you can do. - Make a note of the place on your hard drive where the new
flutter
directory lives.For example, if you copied the
.zip
file's contents to your/Users/janeqreader
directory, make a note of the/Users/janeqreader/flutter
directory. That's your Flutter SDK path.To make sure that you've extracted the downloaded file's contents correctly, look inside the
flutter
directory for a subdirectory namedbin
. Your mileage may vary, depending on when you download the Flutter SDK. - Download the Android Studio IDE.
The download is an
.exe
file, a.dmg
file, or maybe something else. - Install the software that you downloaded in Step 6.
During the installation, a dialog box may offer the option of installing an Android virtual device (AVD). If so, accept the option.
Android Studio isn't the only IDE that has features for creating Flutter apps. Some developers prefer Virtual Studio Code (known affectionately as VS Code) which is available for Windows, Macintosh, and Linux. And if you enjoy roughing it, you can do without an IDE and use the command line along with your favorite text editor — Emacs, vi, or Notepad.
Learn more about Visual Studio Code.
While you're visiting any software download site, check the requirements for downloading, installing, and running that software. Make sure you have enough memory and an operating system that's sufficiently up to date.
Programming Flutter on your Mac
If you have a Mac and you want to create iPhone apps, follow these steps:- Select App Store from the Apple menu.
- In the store's search field, type Xcode and then press Enter.
The App Store's search finds dozens of apps, but only one has the simple name Xcode.
- Click the Xcode app's Get button.
As a result, the App Store installs Xcode on your computer.
- Launch the Xcode application.
The first time you run Xcode, your Mac installs some additional components. If you want your apps to run on Apple devices, you need those additional components.
Configuring Android Studio to program Flutter apps
Android Studio doesn't come automatically with Flutter support, meaning you have to add Flutter support the first time you run the IDE. Here's what you do.- Launch the Android Studio application.
The first time you run a fresh, new copy of Android Studio, you see the Welcome screen.
- Select Configure→Plugins on the Welcome screen.
You’ll find the Configure drop-down menu in the lower right corner of the Welcome screen.
Android Studio's default Welcome screen. - Search for a plugin named Flutter. Install that plugin.
After installing the plugin, Android Studio may want to be restarted. Of course, you should restart it. When you do, you see the Welcome screen again. Now the Welcome screen includes the Start a New Flutter Project option.
You've installed the Flutter plugin.