have a question about flutter's CustomScrollView
What I have now is:
@override
Widget build(BuildContext context) {
return Container(
child: CustomScrollView(
shrinkWrap: true,
slivers: <Widget>[
SliverPadding(
padding: EdgeInsets.all(0),
sliver: SliverList(
delegate: SliverChildListDelegate(
<Widget>[
Card(),
Card(),
Container(
child: ListView.builder(
physics: const NeverScrollableScrollPhysics(),
),
)
],
),
),
),
],
),
);
}
*code was simplified as it's an example.
As you can see there are 2 Cards() and a Container with ListView inside. Both cards has fixed height, the container with list has dynamic height.
How it works now: as ListView grow up we can scroll to the bottom of the list. So normally both Card widgets became invisible because List's elements take all the screen.
The idea is to force second Card() to be pinned to the top of the screen. So basically it's should be on it's own place, but with more and more scrolling it should be pinned to the top of the screen while I'm scrolling list more and more.
The question is how can I do something like this?
Thanks!