Skip to content

Flutter Installation and Setup

Abhinav Agrawal edited this page Jan 23, 2021 · 2 revisions

Introduction to Flutter

Flutter is an open-source UI development tool created by Google, to develop cross-platform applications in iOS, Android, Windows, Mac, Linux, and the web.

We will be using Flutter for the entire Domain Bootcamp.

Installing Flutter

Click here and follow the guidelines to install Flutter, according to your current operating system. If you have any doubts or are getting an error, contact your mentor for further instructions.

Flutter Doctor

After you set up Flutter or your local machine, use the command flutter doctor to check if Flutter is set up correctly.

Flutter Doctor

Flutter Doctor for Windows Doesn't need XCode. Refer to Installation above

This command helps developers to identify any problems in the Flutter installation in their machine and set up their local development environment.
If you do not see any errors in flutter doctor, we can continue to create a new Flutter App.

Code Editors:

Although you might have used Android Studio to install the android dependencies for Flutter, we recommend that you use VSCode to develop your applications, as it is a light weighted IDE as compared to Android Studio.

Project Structure:

Let us start with getting to know the structure of a basic Flutter App. For that, we create a new app using the command flutter create <app-name>.
Note: Here, the name of the app must start with a lowercase alphabet.

After creating your app, open your app's root directory in VSCode.

Project Structure

  • lib : This folder will contain all your code files with the .dart extension which is used to render your Flutter app.
  • lib\main.dart : This file will contain the code which launches the app, every time you run the app. You will create Flutter Widgets in this file.
  • pubspec.yaml - stores a list of packages that are required to run the application, just like package.json does it. You should remember that in Flutter projects you cannot use pub directly, but instead, you will use the Flutter command: flutter pub get <package_name>. If using VSCode, pubspec.yaml page has a download button on the side which runs the above command for all packages you need
  • ios/ & android/ - the code specific for each platform, including app icons and settings where you set what permissions you’ll need for your application (like access to location, Bluetooth). So to switch app icons or to allow some special features like ARCore to run on your device, you need to changes specifics here.
Clone this wiki locally