Updated 28 April 2023
Before starting how to run Flutter app in MacBook using the terminal it is important to know 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!
To install and run Flutter
, your development environment must meet these minimum requirements:
bash
curl
git
2.xmkdir
rm
unzip
which
1 2 |
$ cd ~/development $ unzip ~/Downloads/flutter_macos_v1.7.8+hotfix.4-stable.zip |
flutter
tool to your path:
1 |
$ export PATH="$PATH:`pwd`/flutter/bin" |
This command sets your PATH
PATH
variable for the current terminal window only.
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:
1 |
$ flutter precache |
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):
1 |
$ flutter doctor |
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.
To prepare to run and test your Flutter app on the iOS simulator, follow these steps:
1 |
$ open -a Simulator |
To create your first Flutter app and test your setup, follow these steps:
1 |
$ flutter create dummy_app |
dummy_app
directory is created, containing Flutter’s starter app. Enter this directory:
1 |
$ cd dummy_app |
1 |
$ cd "exiting_flutter_app_path" |
1 |
$ flutter run |
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.