preface
As we all know, a mobile client usually has iOS and Android versions. As a mobile developer, you must have had such an idea: could there be a programming language to write a set of code that can run directly on iOS and Android systems? Now that this problem has been solved, Google has launched Flutter to quickly build a high-quality native user interface on iOS and Android. Read on to learn about Flutter.
The body of the
What is a Flutter
What is a Flutter? Flutter is Google’s mobile UI framework for quickly building high-quality native user interfaces on iOS and Android. Flutter can work with existing code. Flutter is being used by more and more developers and organizations around the world, and Flutter is completely free and open source. This allows mobile developers to develop iOS and Android clients directly using Flutter.
The advantage of Flutter
Efficient and rapid development
- Unified app development experience, one set of code can develop iOS and Android apps at the same time
- The thermal overload of Flutter helps you test quickly, build UI, add features, and fix bugs faster. When a fix crashes, you can resume debugging from where your application left off, greatly reducing development and debugging time
- Access native features and SDKS. Flutter allows you to reuse existing Java, Swift or ObjC code, access native system features and system SDKS on iOS and Android
- Modern, responsive frameworks, and a range of basic widgets make it easy to build your user interface. Solve tough UI challenges with powerful and flexible apis
Expressive, beautiful user interface
- The Material Design and Cupertino (ios-style) widgets, rich Motion apis, smooth and natural sliding effects and platform awareness built into Flutter make the application interface more beautiful and user-friendly
Install the Flutter
System requirements
- Windows
- Operating system: Windows 7 or later (64-bit)
- Disk space: 400 MB (not including Android Studio disk space)
- Tools: Flutter relies on the following command line tools (Git for Windows)
- macOS
- Operating system: macOS (64-bit)
- Disk space: 700 MB (not including Xcode or Android Studio disk space)
- Tools: Flutter relies on the following command line tools (bash, mkdir, rm, git, curl, unzip, which)
- Linux
- Operating system: Linux (64-bit)
- Disk space: 600 MB (not including Android Studio disk space).
- Tools: Flutter relies on the following command line tools (bash, mkdir, rm, git, curl, unzip, which)
Build the Flutter development environment on macOS
Obtain the Flutter SDK
- Download the latest available Flutter installation package from the Flutter website. You may need to climb over the wall to download the package. You can also download the package from Flutter Github.
- Git installation package and add Flutter to path:
git clone -b beta https://github.com/flutter/flutter.git
export PATH=`pwd`/flutter/bin:$PATH
Copy the code
- Run the flutter doctor
At that time, the small editor reported a lot of mistakes, look at the xiaobian face meng forced, but according to the prompts step by step to install the final success. Update libiMobileDevice with a”Requested ‘libusbmuxd >= 1.1.0’ but version of libusbmuxd is 1.0.10“, finally according to the following methods to solve,reference
brew update brew uninstall --ignore-dependencies libimobiledevice brew uninstall --ignore-dependencies usbmuxd brew install --HEAD usbmuxd brew unlink usbmuxd brew link usbmuxd brew install --HEAD libimobiledevice Copy the code
Android Studio configuration
-
Download and install Android Studio 3.0 or later
-
Start Android Studio, and then run the Android Studio Installation Wizard
-
Search for Flutter in Preferences>Plugins and click Install
-
After the installation is complete, restart Android Studio
Install Flutter after Android Studio starts
Now that Android Studio has been configured, let’s create a Flutter application
- Select File>New Flutter Project
- Select Flutter Application as the Project type and click Next
- Enter a project name (such as myFirstFlutterApp), select a save path, and click Finish
- Wait for Android Studio to install the SDK and create the project. 6. Run, can run to the simulator can also run mobile phone, the following is a small series of running mobile phone screenshots
At this point, our Flutter environment has been installed and configured successfully by Android Studio.
conclusion
Installation and configuration are not too troublesome, as long as careful, patience should not be difficult, mainly over the wall is too uncomfortable, xiaobian is starting from scratch to learn welcome everyone to correct.
Reference and learning resources
- Flutter Chinese Learning website
- Flutter website