Reputation: 63
may i ask how to force the first Horizontal Listview Showing when i scroll the another Vertical Listview. This is My Screen
when i scrolling Down to view the Vertical Listview, the Second one to view the items. Then this happens
So the user can't see the First Horizontal ListView any more , he must to go up to view it. and this is my problem, i want that the Horizontal Listview to keep showing when the user scrolled the Vertical Listview Items down.
Thanks in Advance.
home: Scaffold(
appBar: AppBar(
title: Text(title),
),
body: Container(
child: ListView(
shrinkWrap: true,
children: [
Container(
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 20.0),
height: 200.0,
child: ListView(... ), // Horizontal ListView
),
Expanded(
child: Container(
child: ParseLocal(), // Vertical ListView
),
),
],
),
),
),
Upvotes: 0
Views: 585
Reputation: 12803
You don't need to wrap two widget with ListView
since your two widgets is ListView
.
home: Scaffold(
appBar: AppBar(
title: Text(title),
),
body: Container(
child: ListView( // <--this can be removed
shrinkWrap: true,
children: [
Container(
color: Colors.white,
margin: EdgeInsets.symmetric(vertical: 20.0),
height: 200.0,
child: ListView(... ), // Horizontal ListView
),
Expanded(
child: Container(
child: ParseLocal(), // Vertical ListView
),
),
],
),
),
),
Upvotes: 2