mnohrsthadotcomdotnp

Flutter Guide

Installation Guide for window

  1. Get Started
  2. flutter depend on window powershell and git for windows so we must have them.
  3. There are two ways to download flutter.
    • (First way) Download the latest stable release of the Flutter SDK on link flutter.zip , extract the zip file and place the contained flutter in the desired installation location .
    • (Second way) Or Clone the source code from the Flutter Repo
      git clone https://github.com/flutter/flutter.git -b stable
      
  4. Update your path
    • From the Start search bar, enter ‘env’ and select Edit environment variables for your account.
    • Under User variables check if there is an entry called Path:
      • If the entry exists, append the full path to flutter\bin using ; as a separator from existing values.
      • If the entry doesn’t exist, create a new user variable named Path with the full path to flutter\bin as its value

        You have to close and reopen any existing console windows for these changes to take effect.

  5. Run Flutter in cmd (command Prompt) Run flutter command

    If you also result same like image above than you are all set.

  6. Run fluter doctor in cmd (command Prompt) Run flutter doctor
  7. Now you have to installed missing dependencies and then you can run the flutter doctor command again to verify that you’ve set everything up correctly ,like
    • Download and install android studio click link
    • setup android emulator
      • Launch Android Studio, click the AVD Manager icon, and select Create Virtual Device and then Select one or more system images for the Android versions you want to emulate, and select Next. An x86 or x86_64 image is recommended.

        procces to setup emulator in android studio

        1. avd iocn

        2. create virtual device

        3. choose device

        4. select device version

        5. configure setting and click finish

        6. avd iocn

        7. rundevice

        8. emulator ready

      • Or you can use flutter emulator which is created in vscode

        To create a new emulator run

           flutter emulators --create [--name xyz]
        

        To run an emulator

          flutter emulators --launch <emulator id>
        

Start to code with visual studio code

Install Plugin

  1. Flutter
  2. Dart
  3. Awesome Flutter Snippets

Create your project

  1. With shortcuts
    • press ctrl+shift+p key ,click on flutter:new project .
    • Enter your project name, example myfirstapp.
    • specify the directory to save the project.
  2. Or with terminal
    • press ctrl+` key , to start terminal
    • create a folder for a new project anywhere then go to created directory .
    • enter command
      flutter create yourprojectname
      

vscode shortcuts

shortcuts description
ctrl + shift + p it will help to create new project
ctrl + ~ open terminal
cmd + . open option
cmd + space open option

ERROR AND THE SOLUTION