Skip to content

Commit 16153c5

Browse files
author
wanghaijun01
committed
[Fair][2.0]: 修改2.0 readme
1 parent 9ffe477 commit 16153c5

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

README-en.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313

1414
---
1515

16-
Fair is a lightweight package for Flutter, which can be used to update widget tree dynamically. This package is still at an early stage.
16+
Fair is a lightweight package for Flutter, which can be used to update widget tree and state dynamically. This package is still at an early stage.
1717

18-
We create Fair so we can dispatch UI changes to users as bundle(s), the way similar to React Native. With Flutter Fair integrated, you can publish your UI pages without waiting for the next release date of your App. Fair provides standard widget, it can be used as a new dynamic page or as part of existing Flutter page.
18+
We create Fair so we can dispatch any pages changes to users as bundle(s) and JS, the way similar to React Native. With Flutter Fair integrated, you can publish your pages without waiting for the next release date of your App. Fair provides standard widget and some logic plugins, it can be used as a new dynamic page or as part of existing Flutter page.
1919

2020
![what-is-fair](https://github.com/wuba/fair/blob/main/fair/what-is-fair-en.png?raw=true)
2121

2222
## Quick Start
2323
Use Flutter Fair require few steps. Add dependency inside `pubspec.yaml`.
2424
```yaml
2525
dependencies:
26-
fair: ^0.2.0
26+
fair: ^2.0.0
2727
```
2828
2929
Wrap your app with FairApp Widget.

README.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
---
1515

16-
Fair是为Flutter设计的,UI&模板动态化框架,用于动态更新Widget Tree
17-
Flutter Fair is a new package used to update widget tree dynamically.
16+
Fair是为Flutter设计的动态化框架,通过Fair Compiler工具对原生Dart源文件的自动转化,使项目获得动态更新Widget Tree和State的能力
17+
Fair is a dynamic framework designed for Flutter, which enables projects to dynamically update Widget Tree and State through the automatic conversion of native Dart source files through the Fair Compiler tool.
1818

1919
> 在线文档:[https://fair.58.com/](https://fair.58.com/)
2020
@@ -37,6 +37,7 @@ Fair的UI渲染是无损的,可以做到像素级别的还原,看一张转
3737

3838
| Flutter版本 | Dart版本 | CI |
3939
| ------------------------ | ----------- |----------- |
40+
| Flutter 2.0.6 | Dart 2.12.3 | ![v1.22.5](https://github.com/wuba/fair/workflows/build/badge.svg)|
4041
| Flutter 1.22.6 | Dart 2.10.5 | ![v1.22.5](https://github.com/wuba/fair/workflows/build/badge.svg)|
4142
| Flutter 1.22.4 | Dart 2.10.4 | ![v1.22.5](https://github.com/wuba/fair/workflows/1224/badge.svg)|
4243
| Flutter 1.20.4 | Dart 2.9.2 | ![v1.20.4](https://github.com/wuba/fair/workflows/1204/badge.svg)|
@@ -47,7 +48,7 @@ Fair的UI渲染是无损的,可以做到像素级别的还原,看一张转
4748
# Switch to another stable flutter version
4849
#dependency_overrides:
4950
# fair_version:
50-
# path: ../../fair_version/flutter_1_22_6
51+
# path: ../../fair_version/flutter_2_0_6
5152
5253
```
5354
> https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
@@ -112,6 +113,7 @@ samples
112113
* 支持第三方插件在逻辑运算中的扩展 ✅
113114
* 支持布局build方法的子方法拆封 ✅
114115
* 支持布局和逻辑的混编 ✅
116+
* 转换工具开源 ✅
115117

116118
## ⚠️Unsupported Features
117119
由于dart语法解析工作量奇大,会有部分语法和特殊使用方式的限制。
@@ -136,21 +138,25 @@ samples
136138
## 🧯FAQ
137139
**自查步骤(新手必读)**
138140
1. 核对flutter版本与readme说明,确认该版本已被Fair支持
139-
2. 核查fair_version分支版本于flutter一致,且等同于第一步版本号
141+
2. 核查version分支版本于flutter一致,且等同于第一步版本号
140142
2. 如果尚未看过[文档](https://fair.58.com),请先运行自带的sample,能跑起来再接入app
141143
3. 遇到编译错误,请查看终端日志,过滤fair关键词
142144
4. 到github提issue,或gitter。留档/解决,并提供flutter环境信息`flutter doctor --verbose`
143145
---
144146

147+
* 如何调试fairc 和 dart2js?
148+
149+
在compiler build工具,内部使用的是fairc和dart2js的AOT版本。打包AOT请使用dart compile aot-snapshot **.dart
150+
145151
* 为什么没有bin产物?
146152

147-
bin为可选的flatbuffer产物,本机如果需要,请安装[flatc](http://google.github.io/flatbuffers/flatbuffers_guide_building.html)
153+
bin为可选的flatbuffer产物,fair 2期开源了 fairc和dart2js编译转换工具。
148154

149-
* 执行flutter pub run build_runner build后没有产物
155+
* 执行flutter pub run build_runner build后没有产物
150156

151157
请根据适配要求,核查flutter,dart版本
152158

153-
* 执行flutter pub run build_runner build后,提示编译错误信息
159+
* 执行flutter pub run build_runner build后,提示编译错误信息
154160

155161
根据错误日志,有几种情况:1.原代码中存在逻辑表达式,语法解析不通过,尝试剥离逻辑为module;2.`.dart_tool`文件权限问题,请删除后重试
156162

fair.png

185 KB
Loading

fair/what-is-fair.png

20.6 KB
Loading

0 commit comments

Comments
 (0)