如何重建我的PageView.builder?当我在_type
中更改MyPage
属性时,我想重建它
child: PageView.builder(
controller: _controller,
itemCount: items.length,
allowImplicitScrolling: true,
reverse: false,
onPageChanged: (int position) {
item = items[position];
},
itemBuilder: (context, position) => MyPage(
item: items[position],
type: _type)),