Run Flutter App in MacBook using Terminal

Updated 28 April 2023

Save

Before starting how to run Flutter app in MacBook using the terminal it is important to know what is Flutter?

What is Flutter?

Flutter is a mobile app SDK for building high-performance, high-fidelity, apps for iOS and Android, from a single codebase.

The goal is to enable developers to deliver high-performance apps that feel natural on different platforms. We embrace differences in scrolling behaviors, typography, icons, and more.

Check out more about our Flutter app development services.

Below is our application developed using flutter framework

iOS                                     

Android

No mobile development experience is required to get started. Apps are written in Dart, which looks familiar if you’ve used a language like Java or JavaScript. Experience with object-oriented languages is definitely helpful, but even non-programmers have made Flutter apps!

System requirements

To install and run Flutter, your development environment must meet these minimum requirements:

Get the Flutter SDK

  1. Download the following installation bundle to get the latest stable release of the Flutter SDK.
  2. Extract the file in the desired location, for example:
  3. Add the flutter tool to your path:

    This command sets your PATHPATH variable for the current terminal window only.

  4. Optionally, pre-download development binaries:The flutter tool downloads platform-specific development binaries as needed. For scenarios where pre-downloading these artifacts is preferable (for example, in hermetic build environments, or with intermittent network availability), iOS and Android binaries can be downloaded ahead of time by running:

  5. You are now ready to run Flutter commands!

Run flutter doctor

Run the following command to see if there are any dependencies you need to install to complete the setup (for verbose output, add the -v flag):

This command checks your environment and displays a report to the terminal window. The Dart SDK is bundled with Flutter; it is not necessary to install Dart separately. Check the output carefully for other software you might need to install or further tasks to perform (shown in bold text).

If everything is correct then the terminal look like this.

Set up the iOS simulator

To prepare to run and test your Flutter app on the iOS simulator, follow these steps:

  1. On your Mac, find the Simulator via Spotlight or by using the following command:
  2. Make sure your simulator is using a 64-bit device (iPhone 5s or later) by checking the settings in the simulator’s Hardware > Device menu.
  3. Depending on your development machine’s screen size, simulated high-screen-density iOS devices might overflow your screen. Set the device scale under the Window > Scale menu in the simulator.

Create and run a simple Flutter app

To create your first Flutter app and test your setup, follow these steps:

  1. Create a new Flutter app by running the following from the command line:
  2. A dummy_app directory is created, containing Flutter’s starter app. Enter this directory:

    You can also run any exiting application by setting the project path
  3. To launch the app in the Simulator, ensure that the Simulator is running and enter:

Thank You!!!

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home