Giter Club home page Giter Club logo

fair's Introduction

social preview

pub github doc license build Gitter

简体中文|English


Fair是为Flutter设计的,UI&模板动态化框架,用于动态更新Widget Tree。 Flutter Fair is a new package used to update widget tree dynamically.

在线文档:https://fair.58.com/

Fair的UI渲染是无损的,可以做到像素级别的还原,看一张转义Best Flutter UI Templates部分页面后的效果:

best-ui-template

使用的工程来自 https://github.com/mitesh77/Best-Flutter-UI-Templates

🏛Architecture

fair architecture

🚀 Running

为了方便接入&体验Fair框架,请确认你的Flutter运行环境,Fair基于Flutter 1.20.4开发,目前已适配至1.22.x, 推荐使用v1.22.5体验

后续将继续支持最新稳定版本。目前支持版本(如遇问题,Issue反馈):

Flutter版本 Dart版本 CI
Flutter 1.22.4/1.22.5 Dart 2.10.4 v1.22.5
Flutter 1.20.4 Dart 2.9.2 v1.20.4
Flutter 1.17.3 Dart 2.8.4 v1.17.3
Flutter 1.12.13+hotfix.9 Dart 2.7.2 v1.12.13

注意:由于部分版本flutter构建脚本存在巨大变化,会导致同一个模板工程无法同时运行在不同版本。

https://flutter.dev/docs/development/tools/sdk/releases?tab=macos

Fair的example位于fair/example目录,同时也附带了一些社区demo并转为fair动态化形式,工程位于samples目录下,克隆后直接build对应仓库即可即可。

samples
├── adobe_xd // adobe_xd插件demo, xd插件可以从设计稿直接导出flutter代码
├── best_flutter_ui_templates // 一个UI很漂亮的Flutter模板项目
└── my_app  // 经典的Flutter Hello World
    ├── README.md
    ├── android
    ├── assets
    ├── build
    ├── ios
    ├── lib
    ├── my_app.iml
    ├── pubspec.lock
    ├── pubspec.yaml
    ├── test
    └── web

更多接入操作请参考 https://fair.58.com/

  • fair https://pub.dev/packages/fair
  • fair_compiler https://pub.dev/packages/fair_compiler
  • fair_annotation https://pub.dev/packages/fair_annotation
  • fair_version https://pub.dev/packages/fair_version

📎相关介绍

🕰2020&2021 Roadmap

  • 开源准备 2020
  • Bug修复
    • Github issue处理
  • 维护迭代 2021
    • Framework适配优化
    • 局部刷新支持 ✅
    • 状态库支持Provider
    • 独立cli工具
    • 转化优质Demo ✅
    • 动画支持的形式
    • Flutter Favorite Package支持
    • 其他Top UI Package支持
    • 逻辑组件优化 ✅
      • CI流程
      • 社区插件贡献方式

⚠️Unsupported Features

由于dart语法解析工作量奇大,逻辑运算均不支持,由逻辑运算延伸的表达式则更多。 下面是一些,不支持特性&已知问题:

  • 逻辑表达式,比如加减乘除,字符拼接,循环遍历语法等
  • 链式点语法,如:Colors.black.withOpacity(0.59),Colors.xxx本身是支持的,但是再次转换透明的则不支持
  • 匿名Builder函数,如ListView的的builder属于逻辑运算,需要封装为组件

🔧Contributing

通过Issue提交问题,贡献代码走Pull Request,管理员将对代码进行审核。

对Fair感兴趣的小伙伴,可以加入交流群。技术咨询、讨论,请移步至Gitter

微信 美事(内部)
wechat meishi

如微信码过期,可以找管理员(请务必备注flutter fair,否则不予通过):do_not_let_me_know

🧯FAQ

  • 为什么没有bin产物?

bin为可选的flatbuffer产物,本机如果需要,请安装flatc

  • 执行flutter pub run build_runner build后没有产物

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

  • 执行flutter pub run build_runner build后,提示编译错误信息

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

LICENSE

Fair项目基于BSD协议开源。我们使用的更多依赖库详见pubspec.yaml

感谢UXD的Kaibin老师提供设计支持

fair's People

Contributors

avenwu avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.