Fair
Fair copied to clipboard
This application cannot tree shake icons fonts. It has non-constant instances of IconData at the following locations:
环境: fair 3.0.0
错误信息: This application cannot tree shake icons fonts. It has non-constant instances of IconData at the following locations:
- file:///Users/cinson/.pub-cache/hosted/pub.flutter-io.cn/fair_version-3.0.0+2/lib/src/widgets/$$w.dart:3648:30 FAILURE: Build failed with an exception.
暂时加上--no-tree-shake-icons规避了一下,但是还是fair本身要解决一下这个问题
目前fair动态化是通过解析JOSN节点在运行时创建Widget的方式实现的,所以创建的Widget的参数都是在运行时才确定,这也导致创建的widget无法声明为const。这个问题我们在后续会想办法做兼容处理,现阶段只能通过--no-tree-shake-icons规避
https://github.com/wuba/Fair/pull/253 最新的已经移除掉了