alibaba / fish-redux

An assembled flutter application framework.
https://github.com/alibaba/fish-redux
Apache License 2.0
7.33k stars 843 forks source link

listview添加ScrollController,导致监听,及下拉刷新失效 #574

Closed shuai0825 closed 4 years ago

shuai0825 commented 4 years ago

state中 GoodsShowState initState(Map<String, dynamic> args) { final GoodsShowState state = GoodsShowState(); state.goodItems = List(); state.scrollController = ScrollController(); return state; } view中 RefreshIndicator( onRefresh: () { dispatch(Action(GoodsShowAction.refresh, payload: () { completer.complete(); })); return completer.future; }, child: ListView.separated( controller: state.scrollController, itemBuilder: adapter.itemBuilder, separatorBuilder: (BuildContext context, int index) { return divider; }, itemCount: adapter.itemCount, padding: EdgeInsets.only(top: 11),

  ),
)
shuai0825 commented 4 years ago

flutter当前版本导致的,解决办法可以用gridview代替listview