Flutter:让TabBar也保持住状态
2018-09-21 本文已影响11人
JarvanMo
使用TabBar同样存在TabBarView重新build的问题,解决方案一样,加一个PageStorageKey:
child: new Container(
key: new PageStorageKey(page.country),
child: new Newsfeed(country: page.country),
),
使用TabBar同样存在TabBarView重新build的问题,解决方案一样,加一个PageStorageKey:
child: new Container(
key: new PageStorageKey(page.country),
child: new Newsfeed(country: page.country),
),