Flutter PageView inside NestedScrollview requires fixed height
I use PageView inside NestedScrollView. On page in PageView I fetch data from server. But content inside pageview don't scrolling because I should wrap pageview with SizedBox with fixed height. How can I expand page for content?
on page #1:
NestedScrollView(
key: _homeNestedKey,
headerSliverBuilder: (context, innerBoxIsScrolled) {
return <Widget>[
SliverAppBar(
...
bottom: CustomTabBar(
items: tabItems,
onChangedIndex: _onTabChan开发者_JS百科ged,
chosenIndex: _chosenTabIndex,
),
),
];
},
body: SmartRefresher(
...
onRefresh: _onRefresh,
onLoading: _onLoading,
child: PageView(
onPageChanged: _onPageChanged,
controller: _pageController,
children: const [
FeedContent(),
PromotionsContent(),
ShopContent(),
],
),
),
),
inside FeedContent:
ListView(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
children: [
...feed.map((f) => FeedItemCard(feedItem: f)),
const SizedBox(height: 36),
if (isLoading) const CustomLoader(),
const SizedBox(height: 100),
],
);
精彩评论