Quick Start Guide

This guide provides a quick overview to get your Flutter project up and running. Follow these steps to set up your development environment and run your first application.

1. Install Flutter

macOS

  1. Download the Flutter SDK:

  2. Extract the SDK:

    • Extract the downloaded zip file to your desired installation location.
  3. Update PATH:

    • Open a terminal and add Flutter to your PATH:
      export PATH="$PATH:`<path-to-flutter-sdk>`/bin"
  4. Run Flutter Doctor:

    • Check your setup by running:
      flutter doctor
    • Follow any instructions to complete the setup.

Windows

  1. Download the Flutter SDK:

  2. Extract the SDK:

    • Extract the downloaded zip file to a location on your drive (e.g., C:\src\flutter).
  3. Update PATH:

    • Add Flutter to your PATH environment variable:
      • Open System Properties → Advanced → Environment Variables.
      • Add a new entry in the PATH variable pointing to flutter/bin.
  4. Run Flutter Doctor:

    • Open a command prompt and run:
      flutter doctor
    • Follow any instructions to complete the setup.

2. Set Up Your Development Environment

Android

  1. Install Android Studio:

    • Download and install Android Studio.
    • During installation, select the option to install Android SDK and Android SDK Command-line Tools.
  2. Set Up Android Emulator:

    • Open Android Studio, go to AVD Manager, and create a new virtual device.

iOS

  1. Install Xcode:

    • Download and install Xcode from the Mac App Store.
  2. Set Up Xcode Command-line Tools:

    • Open a terminal and run:
      xcode-select --install

3. Create a New Flutter Project

  1. Open Terminal or Command Prompt:

    • Navigate to your desired directory.
  2. Create a New Project:

    • Run:
      flutter create my_app
    • Replace my_app with your desired project name.
  3. Navigate to Project Directory:

    cd my_app

4. Run the Flutter Application

  1. Connect a Device or Start an Emulator:

    • Connect a physical device via USB or start an emulator.
  2. Run the Application:

    • Execute:

      flutter run
    • This will build and launch the application on the connected device or emulator.

5. Modify and Explore

  1. Open the Project in Your IDE:

    • Use your preferred IDE (Android Studio, VS Code, etc.) to open the project.
  2. Edit the Main Dart File:

    • Modify lib/main.dart to change the default app content.
  3. Rebuild and Rerun:

    • Save your changes and use flutter run to see updates in real-time.

Helpful Commands

  • Check Flutter Environment:

    flutter doctor
  • Update Flutter SDK:

    flutter upgrade
  • Get Dependencies:

    flutter pub get
  • Build APK:

    flutter build apk --release
  • Build iOS App:

    flutter build ios --release

Additional Resources

Feel free to refer to these resources for more detailed information and guidance.