-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only scrolls with SliverFillRemaining and takes to much space at the end #74
Comments
It turns out the initial list was smaller than the viewport and scrolling was not being activated. I ended up:
The above changes forced scrolling while having Working code with changes commented: return CustomScrollView(
controller: scrollController,
physics: BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
slivers: <Widget>[
...cards
.where((c) => c.show)
.map((c) => SliverStickyHeader(
header: _buildSubHeader(
context: context,
text: c.text,
iconData: c.iconData,
color: c.color
),
sliver: SliverFixedExtentList(
itemExtent: 73,
delegate: SliverChildBuilderDelegate(
(context, index) => TransactionTileWidget(
transaction: c.transactions[index],
onTransactionPressed: (e) => print("Hello")
),
childCount: c.transactions.length,
)
),
)
),
SliverFillRemaining(
hasScrollBody: false, // <--- HERE
fillOverscroll: true,
child: Container()
),
SliverToBoxAdapter( // <--- HERE
child: Container(height: 10) // <--- HERE
), // <--- HERE
],
); |
Solved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have working code with
SliverStickyHeader
but need to addSliverFillRemaining
at the end for the list of slivers to scroll. Scrolling doesn't work without it. The problem is it takes too much space (the whole viewport height) at the end.Is there anything I'm doing wrong here?
This is the relevant portion of code:
Greater code context below (click to expand) ▼:
The text was updated successfully, but these errors were encountered: