Dart 语言
https://book.flutterchina.club/chapter1/dart.html
中文社区
https://flutterchina.club/setup-macos/
https://flutter.io/docs/development/tools/sdk/archive?tab=macos#macos
Flutter 教程
https://juejin.im/post/5c0db59f6fb9a049bb7c2810
http://jspang.com/post/flutter1.html
https://flutter.io/docs/cookbook
https://flutter.io/docs/get-started/codelab
https://flutterchina.club/get-started/learn-more/
阿里巴巴为大家学习Flutter操碎了心
https://github.com/zcwfeng/flutter-go
Flutter 文档和部署
https://flutter.cn/posts/launching-flutter-12-at-mobile-world.html
Flutter 环境配置
macos
.bash_profile
export FLUTTER_HOME="/Users/zcw/dev/flutter"
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=${FLUTTER_HOME}/bin:...:${PATH}
执行 flutter doctor
包导入管理和总结
- 网页查询
- https://pub.dartlang.org/packages/
- https://pub.dartlang.org/packages/url_launcher
- https://flutterchina.club/using-packages/
- https://flutterchina.club/developing-packages/
import 'package:flutter/material.dart';
import 'package:css_colors/css_colors.dart';
import 'package:flutter/animation.dart';
import 'package:url_launcher/url_launcher.dart';
- 用过的库
CSSColors ----> https://flutterchina.club/using-packages/#css-example
- pubspec.yaml 文件
dependencies:
url_launcher: '>=0.1.2 <0.2.0'
collection: '^0.1.2'
css_colors: ^1.0.0
iOS 相关
https://flutter.io/docs/get-started/install/macos
some times need fix:
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
brew install ideviceinstaller
vscode 运行getpackage 出错
解决办法用命令行:
flutter packages get
github 开源资料
https://github.com/flutterchina
社区
https://flutterchina.club/app/gm.html
用到的核心
- skia https://skia.org/ (ios 没有打在包里,android系统自带)
- Dart https://pub.flutter-io.cn/
- JIT和AOT。
程序主要有两种运行方式:静态编译与动态解释。静态编译的程序在执行前全部被翻译为机器码,通常将这种类型称为AOT (Ahead of time)即 “提前编译”;
而解释执行的则是一句一句边翻译边运行,通常将这种类型称为JIT(Just-in-time)即“即时编译”。
AOT程序的典型代表是用C/C++开发的应用,它们必须在执行前编译成机器码,
而JIT的代表则非常多,如JavaScript、python等,事实上,所有脚本语言都支持JIT模式。
但需要注意的是JIT和AOT指的是程序运行方式,和编程语言并非强关联的,有些语言即可以以JIT方式运行也可以以AOT方式运行,如Java、Python,它们可以在第一次执行时编译成中间字节码、然后在之后执行时可以直接执行字节码,也许有人会说,中间字节码并非机器码,在程序执行时仍然需要动态将字节码转为机器码,是的,这没有错,不过通常我们区分是否为AOT的标准就是看代码在执行之前是否需要编译,只要需要编译,无论其编译产物是字节码还是机器码,都属于AOT。
在此,读者不必纠结于概念,概念就是为了传达精神而发明的,只要读者能够理解其原理即可,得其神忘其形。