Category: Flutter

  • Create your first Flutter project

    To create your first Flutter project on Mac you just need your terminal and editor, we are going to use Visual Studio Code with Dart Code Plugin.

    If you haven’t installed Flutter Framework, please follow this tutorial
    How to install Flutter on Mac.

    1) Open the terminal on your Mac and cd to the directory you want to create your Flutter project.

    Type this flutter create ff_tutorial_2

    ff_tutorial_2 is my project name, you can use whatever you want. Your terminal should print something like this.

    Create your first Flutter project

    2) Open the project with Visual Studio Code, if you have Dart Code plugin you should see running simulator or device name on the right-bottom of the editor.

    Create your first Flutter project

     

    3) Now open terminal again or use Visual Studio Code terminal and type this

    flutter run

    Your first Flutter project will run on the simulator.

    Create your first Flutter project

    Spread the love
  • How to install Flutter on Mac

    Install Flutter by homebrew on Mac

    If you are looking for instruction for Windows or Linux, please click here. To install flutter on Mac, please follow these instructions.

    1)  Download Flutter Framework .zip from Flutter GitHub, make sure you are downloading beta branch. Take a look at this screenshot.

    install flutter

    2) Create a directory called flutter in your home directory or wherever you want, I usually put this in my packages directory. So it looks like this ~/packages/flutter.

    3) Update your .bash_profile. Open with your text editor or nano ~/.bash_profile on the terminal.  Add this line

    export PATH=/Users/YourUserName/packages/flutter/bin:$PATH

    Replace YourUserName with your Mac user.

    install flutter

    Now open the terminal and type flutter, you should see the list of available commands. It means flutter is installed successfully on your Mac.

    install flutter

    But we are not finished yet, Mac needs few more stuff.

    4) Now type flutter doctor on the terminal just like brew doctor. It will check for errors. Install all the required dependencies from Homebrew.

    Now you are ready to go.


    Spread the love