Flutter (Getting Started)

Insert picture description here

Flutter (Getting Started)

Declarative layout

Traditional iOS and Android are imperative

Layout "from outside to inside"

Multi-draw interface, find feeling from it

performance

flutter controls every pixel on the screen, avoiding the performance loss caused by the need for javaScript bridge

RN is to convert the layout to IiOS/Android native layout

Environment configuration

Configure the environment variable bash_profile

  • Shortcut open ~
  • open .bash_profile
  • Create vim bash_profile
  • : Source bash_profile

Mirroring needs to be configured due to the wall. See specifically using flutter in china

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

  • export PATH=“ P W D / f l u t t e r / b i n : PWD/flutter/bin: PWD/flutter/bin:PATH”

    SDK path

flutter doctor checks the installation of environment variables

Create a project from the command line

  • flutter create my_app

    • Directory Structure

      • iOS host project
      • android host project
      • lib is mainly dart language
      • pubspec.yaml: dependent package configuration
  • do flutter

  • r: hot reload

  • R: Hot restart

  • q: exit

  • t: stop

iOS real machine running project

  • open runner.xcodeproj

Experience

You may encounter some network environment problems that may cause it to fail to run

While downloading the tool, it is best to create a demo run to determine whether the tool can run normally.

Flutter development tools recommend Android studio

Need to be familiar with the Android studio tool user guide

XMind - Trial Version

Guess you like

Origin blog.csdn.net/u010436133/article/details/108963700