Study Notes: flutter project to build (mac version)

What is the flutter

Flutter is Google's mobile UI framework, we can quickly build high-quality native user interface on iOS and Android. Flutter can work with existing code. In the world, Flutter is being used by a growing number of developers and organizations, and Flutter is completely free, open source.

flutter has the following advantages

  • Rapid development (with thermal loading function, similar to webpack configuration devServer heat load)
  • Expressive, beautiful user interface
  • Modern response frame (State classes by calling the setState, a value corresponding to the change, widget will re-rendering)
  • Access to local features and SDK
  • Unified application development experience

End mobile solutions in several stages

  1. h5 webview embedded in the page in a native app
  2. JSBridge done by hybrid bridge (web mode or nature) between native and non-native
  3. react-native will be compiled into the native view of view so as to achieve a good experience, but still need to do to connect JSBridge
  4. After Flutter absorbed the lessons of the former, in rendering technology, has chosen its own realization (GDI)

reactive-native schematics

The principle flutter

He began to build flutter

Mirroring

flutter official for the Chinese developer to build a temporary mirror, you can put the following environment variable added to the user's environment variables directly mac vim ~/.bash_profilemodification can, if used zsh also ~/.zshrc, you modify source ~/.bash_profileto

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

Get Flutter SDK

Portal needs over the wall, or go directly to github download the installation package

Downloading unpack, then add flutterto the tools in the pathexport PATH=pwd/flutter/bin:$PATH

注意pwd为你解压flutter安装包的路径

Run flutter

Run flutter doctorto see what else is not installed, follow the prompts to install the appropriate thing to

Creating a flutter project

After all of the above installations are completed by terminal can then flutter create 目录名create a project, and then perform open -a Simulatoropen the iPhone simulator

Install the following packages to ensure they are capable ios simulation debugging

brew update
brew install --HEAD libimobiledevice
brew install ideviceinstaller ios-deploy cocoapods
pod setup

Flutter in your project directory by open ios / Runner.xcworkspace open the default Xcode workspace. Finally, the implementation of flutter runyour first flutter project ran up

The editor has recommended flutter vscodeand Android studioplug-in installed corresponding to

Detailed installation tutorial can look at the specific flutter official website , the tutorial for their own study notes, will open another text later how to use the flutter to develop

Guess you like

Origin www.cnblogs.com/songbw/p/11751928.html