Configure flutter with android studio and VS Code
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:
- Operating Systems: macOS (64-bit)
- Disk Space: 2.8 GB (does not include disk space for IDE/tools)
- Tools: Flutter depends on these command-line tools being available in your environment
bash ,curl, git
2.x,mkdir, rm, unzip, which, zip
Get Flutter SDK for mac:
- 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 - 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 - User can also clone the latest version of SDK
$ git clone https://github.com/flutter/flutter.git -b stable
- Add the flutter tool to your path
$ export PATH="$PATH:`pwd`/flutter/bin
- If user want to update the path, user can do it using
$ export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"
- User can also verify path that is configured
$ echo $PATH
Plateform setup:
iOS Configuration
- 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
- Install the android studio.
- While creating a new flutter project user need to set the package name/ bundle identifier of the application.
- 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.
- Go to android studio preferences and select plugins option then install flutter and dart plugins.
Setup Android Device
- First to enable the developer option in your device
- Then , go to developer option and enable the USB Debugging option
- 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 computerAfter 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