Configure flutter with android studio and VS Code

Shubham Jain
3 min readApr 20, 2020

--

Today, we will see How To Install Flutter On Mac, user can also install flutter on windows as well. Flutter allows us to make build beautiful native apps on iOS, Android and web from the single codebase. Flutter’s widget architecture incorporates all the critical platform differences such as scrolling, navigation, icons and fonts to provide full native performance on iOS ,Android and web devices.

Flutter’s hot reload helps us quickly and easily experiment, build UIs, add features, and fix bugs faster.
Experience sub-second reload times, without losing the state, on emulators, simulators, and hardware for iOS and Android.

Flutter’s built-in beautiful Material design and Cupertino design (iOS ) widgets, rich motion APIs, smooth, natural scrolling, and platform awareness

Lets start with configuration process

Prerequisites:

  1. Operating Systems: macOS (64-bit)
  2. Disk Space: 2.8 GB (does not include disk space for IDE/tools)
  3. Tools: Flutter depends on these command-line tools being available in your environment
    bash ,curl, git2.x, mkdir, rm, unzip, which, zip

Get Flutter SDK for mac:

  1. User can download the flutter sdk stable version using the below command
    https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_v1.12.13+hotfix.9-stable.zip
  2. After downloading the zip file extract zip file at any desired location using the following command on terminal
    $ cd ~/development
    $ unzip ~/Downloads/flutter_macos_v1.12.13+hotfix.9-stable.zip
  3. User can also clone the latest version of SDK
    $ git clone https://github.com/flutter/flutter.git -b stable
  4. Add the flutter tool to your path
    $ export PATH="$PATH:`pwd`/flutter/bin
  5. If user want to update the path, user can do it using
    $ export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"
  6. User can also verify path that is configured
    $ echo $PATH

Plateform setup:

iOS Configuration

  1. Install Xcode

If you have multiple xcode then set the default xcode path
$ sudo xcode-select --switch/Applications/Xcode.app/Contents/Developer

2. User can create first flutter application using terminal
$ flutter create appName(myApp)

3. Launch the application using this
$ flutter run

Android Configuration

  1. Install the android studio.
  2. While creating a new flutter project user need to set the package name/ bundle identifier of the application.
  3. User also need to set flutter SDK path as well. User need to provide the project name is lowercase as it is the convention that flutter use.
  1. Go to android studio preferences and select plugins option then install flutter and dart plugins.

Setup Android Device

  1. First to enable the developer option in your device
  2. Then , go to developer option and enable the USB Debugging option
  3. Select your device in android studio

for web app select the chrome(web) option and simply launch the application. You do not need to do anything if you create new flutter project.
There should at-least one browser installed in your computer

After setting up android studio with required plugins and flutter SDK path, user can start with flutter demo application.
Note: User can also use VS Code for flutter instead of android studio.

Previous Post: Offline data storage
https://medium.com/@zenshubham09/offline-data-storage-in-ios-3e8dc68f6e3b

Thanks

--

--

No responses yet