Starting With Flutter

Starting With Flutter

Introduction

Hey Everyone, I Know People Want To Start With Development (Which Is Like Applying Your Coding Skills To Work) And It Is Very Important To Start With The Development. So, To Start With Your Journey With Flutter. I Hope Many Would Know About Flutter But If You Don't Know About This Then I'll Let You Know That Flutter is a Cross-Platform Software Development Kit Created By Google which is an Open-Source Software(A Software Has A License And is created by Millions of Developers under the Guidance Of Maintainer Of The Software). Which Has A Code Written in a Programming Language Dart(Also Created By Google And Open Source Software) Flutter can help you develop in iOS, Android, Linux, Windows, MacOS And Web. Hope It Makes You Excited. So, Let's Deep Dive Into It.

giphy.gif

Let's Start With The Installation

The Installation For The Flutter is Quite Easy To Start With:

  1. Install Android Studio

Download Your Android Studio

It Would Look Like This.

Then Click On The Download Android Studio Button Which Would Load To An Agreement After Accepting It Would Start Downloading the latest Android Studio According To Your System Specification. And Then Install With It. After That There Would Be Screen Coming Up To The System That would be

![Screenshot 2022-06-08 202305.png](cdn.hashnode.com/res/hashnode/image/upload/... png align="left") After That Click On The Right-Top Button The 3-Point Button And Click On It. Then Click On The SDK Manager

image.png

Download For An Android SDK Of Around SDK 29 or more as it is more suitable.

  • Install Flutter

Download Flutter

Choose Your Suitable Operating System Then Follow The Steps On The Webpage. Move Further with the steps For Further Installing Of The Flutter Files. After Successful Installing And Adding it To Path Then Move To Your Favorite Terminal Follow With Below Steps.

Step 1: Run This in Terminal

flutter doctor

You Will See This

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.19044.1741], locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✗] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✗] Visual Studio - develop for Windows
    ✗ Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.67.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

! Doctor found issues in 2 categories.

Mine Flutter Is Working Great You Will Find a Error That Is for Android Toolchain For This You Need To Open The SDK Manager Which is Mentioned Above In The Installing Of Android Studio And Then Click For SDK Tools And Then Download or Update The cmdline tools and platform tools After That Again Fireup Your Terminal Then Again, Run

flutter doctor

Then It May Ask For The Permissions By Running The Below In Terminal

flutter doctor --android-licenses

After The Run You Need To Provide With The Permission By Pressing 'Y' After Every Agreement. After Providing With The Permissions Now Your Flutter Is Ready To Be Used.

Check-For-Flutter

Run The Command In Terminal

Flutter

You Will See This

image.png Which Shows That Your Flutter Is Working Fine.

How To Create Your First App

Follow The Below Steps

  1. Navigate To The Folder in your Terminal In Which You Want To Create Your App.
  2. In Terminal Type
    flutter create [APP_NAME]
    
  3. It Would Show Some Packages Loading....
  4. Then It Will Show.
Creating project E:\yourapp...
Running "flutter pub get" in yourapp...                             6.9s
Wrote 127 files.

All done!
In order to run your application, type:

  $ cd E:\yourapp
  $ flutter run

Your application code is in [PATH\OF_YOUR_DEVICE].
  1. To Run Your App Connect Your Phone With PC And Then Enable The Developer Options In Your Phone By

    Navigating To The About Phone And Then Go To Build Number And Clicking On This Multiple Times upto 8-9 times after that your phone shows a small Box Which Shows 'now Developer Options Are Available'. Then Go To The Developer Options And Enable USB Debugging.

  2. In Terminal, Type
    flutter devices
    

It Would Show The Connected Device

3 connected devices:

SM A325F (mobile) • RZ8R22R9WBB • android-arm64  • Android 12 (API 31)
Windows (desktop) • windows     • windows-x64    • Microsoft Windows [Version 10.0.19044.1741]
Edge (web)        • edge        • web-javascript • Microsoft Edge 102.0.1245.33
  1. To Run The App, Type
    flutter run -d [DEVICE_NAME] 
    *ignore brackets
    
  2. After Some Time Your App Would Load In The Phone Showing This

image.png

By Clicking The PLUS Button For Activity In The App.

Hope Liked Reading It. Any Suggestions revert me in my twitter handle.