我有一个动态列表视图,它看起来如下:
final items = [...]; // Many items, which can be changed by some conditional.
ListView.builder(
itemCount: items.length,
itemBuilder: (context, index) => SomeWidget(items[index].title)
)
一些条件(如用户文本输入被更改)将更改items。在items更改之后,我将调用setState来更新列表视图。
在调试环境中,它工作得很好。但在分析器/发
当我在ui中呈现一个来自我创建的es6类的项目列表时,我正试图解决我看到的一个问题。这个模型工作得很好,但是我使用的动画是听(在反应中)挂载,onEnter和onLeave的项目。
当我通过模型应用过滤器和排序,并通过getter返回新的项目列表时,动画不适用于某些项目,因为列表只是重新排序,不一定要更改。
因此,我的getter只是抓取类的this.products并返回它,并对其应用排序顺序。如果应用了过滤器(由类中的this._checkedList跟踪),则根据选择筛选器的方法减少this.products,然后排序。所以这个getter看起来是这样的:
get productLi
我已经创建了一个自定义ComboCheck,它扩展了spark,它是复选框的DropDownList。在我的itemRenderer中,我有以下代码:
[Bindable]override public function set data (value:Object):void {
if (value!=null) {
_data = value;
item.label = value.label;
item.group = value.group;
item.toolTip = value.toolTip;