ListView( children: <Widget>[ ListView( shrinkWrap: true, //為true可以解決子控件必須設置高度的問題 physics:NeverScrollableScrollPhysics(),//禁用滑動事件 ), ], )
如果需要兩個listview同時滑動,則需要向他們傳同一個scrollcontroller
ScrollController _scrollController; ListView( controller:_scrollController, children: <Widget>[ ListView( controller:_scrollController, ), ], )
參考鏈接:https://www.jianshu.com/p/4f7fff2ed440