expression_util library

Constants

TYPE_DIRECTIVE → const String
"directive"
TYPE_PROPERTY → const String
"property"

Functions

calcRepeatSize(MethodChannel methodChannel, String pageId, String componentId, String type, String key, String expression) Future
pageId: 页面ID componentId :组件ID type :TYPE_PROPERTY(属性), TYPE_DIRECTIVE(指令) key : properties对应的key,方便结果回调查找 expression : 表达式
getExpression(String dataSource) String
在双花括号中获取表达式
getInRepeatExp(Component component, String exp) String
获取在for里面的表达式 判断是否有表达式前缀,有则需要拼接 e.g.:return list e.g.:var index = 0; var item = listindex; return item
getInRepeatPrefixExp(dynamic indexName, dynamic itemName, dynamic exp, dynamic inRepeatIndex, dynamic parentInRepeatPrefixExp) String
获取在for里面的表达前缀,判断父层级是否有前缀,有则需要在拼接在前面 e.g.:var index = 0; var item = listindex; e.g.; var index = 0; var item = listindex; var idx = 0; var it = itemidx;
handleProperty(MethodChannel methodChannel, String pageId, Component component) Future<void>
处理property以及innerHTML
removeObserver(MethodChannel methodChannel, String pageId, List<String> ids) Future<void>
组件移除监听 ids 组件id集合