In this article we will dissect the folder structure of the default Flutter app and understand how to manage the various resources needed for developing a cross platform app using Flutter. In my last article, I mentioned the step by step installation guide about how to install Flutter with Android Studio on Mac as well as Windows. The root cause for me is the fact that Mac Os Sierra uses python 2.x and when you manage to install a parallel python3 things go south with the flutter installation since the pip installer defaults to 3.x installation directory instead of OS default i.e 2.x and flutter doc doesn't detect it. What is Google’s Flutter? Flutter is Google’s mobile UI framework for crafting high-quality native interfaces on iOS and Android in record time. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source. Build beautiful native apps in Flutter. In this Flutter Tutorial Series, we will cover Flutter tutorials for beginners, Flutter SDK, and how to build a simple Hello World Flutter app for Android and iOS. Note: Flutter is still in Beta 1 at the time of this tutorial post. How to download layer effects for gimp on mac. Why build on Flutter? Flutter comes with a lot of features packed in like Hot Reload, Expressive Beautiful UIs, Native performance. But then the biggest feature of them all is Unified App Development using a single code base. You can now build native apps on both Android and iOS apps using a single code base in Flutter. Furthermore, apps and interfaces made with Flutter are built from a single codebase, compiled directly to native arm code, use the GPU, and can access platform APIs and services. ![]() Flutter Tutorials – Getting Started with Flutter Now that we have a pretty good idea on Flutter, let’s get started. In this tutorial, we will follow the steps to have flutter installed and setup. Flutter Tutorial Series – Flutter tutorials for beginners Installing on Mac OS: System requirements To install and run Flutter, your development environment must meet these minimum requirements: • Operating Systems: macOS (64-bit) • Disk Space: 700 MB (does not include disk space for Xcode or Android Studio). • Tools: Flutter depends on these command-line tools being available in your environment. • bash, mkdir, rm, git, curl, unzip, which Make sure all the tools are already installed on your system. ![]() First of all, Open the Terminal on Mac and then check the following. Flutter tutorials for beginners – Bonus Fix: As you can see from the above image when I ran the git command, it threw the following error. Xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun This error occurs due to the recent upgrade of your system to OS X El Capitan from the App Store. Hence, you can fix this issue by executing the following command in your Mac Terminal. Xcode-select --install The above command will bring up a pop-up window to install it on your system. So in MAC, git is attached to XCode’s Command line tools. Once you have installed successfully, your git command will start working again without throwing that error again. Now that we have all the necessary tools in our system, let’s proceed to get the Flutter SDK. Installing Flutter on Windows and Linux: Don’t worry if you are not on mac os, Please find the links below for installing flutter on windows and linux operating systems. Flutter Tutorial Series – Get Flutter SDK First of all, let’s decide where to put our Flutter SDK. So I have created a folder called Flutter Workspace. Using the command terminal, go to that folder using the following command. Cd Flutter Workspace To get Flutter SDK, use git to clone the repository and then add the flutter tool to your path. Running flutter doctor shows any remaining dependencies you may need to install. Git clone -b beta Update your path You’ll probably want to update PATH variable permanently, so you can run flutter commands in any terminal session. The steps for modifying this variable permanently for all terminal sessions are machine-specific. So, Typically you add a line to a file that is executed whenever you open a new window. For example: • Determine the directory where you placed the Flutter SDK. • Open (or create) $HOME/.bash_profile. The file path and filename might be different on your machine. • Add the following line and change [PATH_TO_FLUTTER_GIT_DIRECTORY] to be the path where you cloned Flutter’s git repo: $ export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH • If you are wondering how to edit the file and make the changes, you can execute the following commands. • $ vi $HOME/.bash_profile • press the I button to insert • copy paste the code export PATH='[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH' at the end of the file. • Press ESC and then followed by: wq to save the file. • Run source $HOME/.bash_profile to refresh the current window. • Finally, verify that the flutter/bin directory is now in your PATH by running: $ echo $PATH Run flutter doctor Run the following command to see if there are any dependencies you need to install to complete the setup: $ flutter doctor The first time you run a flutter command (such as flutter doctor), it downloads its own dependencies and compiles itself. Subsequent runs should be much faster. Android setup Install Android Studio To develop Flutter apps for Android, you can use a Mac, Windows, or Linux (64-bit) machine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |