I want to add vertical and horizontal list in single list but problem is when i want to put horizontal and vertical list in single list i have give height to container but for vertical list i want to scroll in full screen but it is not possible i have to put height to vertical list also please help me.
class mydynamic extends StatefulWidget {
@override
_mydynamicState createState() => _mydynamicState();
}
class _mydynamicState extends State<mydynamic> {
List<String> my_text = [
"Hello",
"World",
"dasdasd",
"asdasdasd",
"sadasdasda"
];
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
"Videolist",
style: TextStyle(color: Colors.white),
),
),
body:ListView(
children: <Widget>[
_horizantal_list(),
_vertical_list()
],
),
);
}
Widget _horizantal_list()
{
return Container(
height:50.0,
child: ListView.builder(
itemCount: my_text.length,
scrollDirection: Axis.horizontal,
itemBuilder:(context,index){
return Card(
child: Text(my_text[index]),
);
}),
);
}
Widget _vertical_list()
{
return Container(
height: 150,
child: ListView.builder(
itemCount: my_text.length,
itemBuilder: (context, index){
return Card(
child:Text(my_text[index]),
);
},
),
);
}
}
please any solution for this Thank you