cft

How to Display two ListViews on a One Screen In a Flutter?

We all know the ListView Widget is one of the important Flutter widget that can be used any Flutter app project.


user

Flutter Agency

2 years ago | 4 min read

We all know the ListView Widget is one of the important Flutter widget that can be used any Flutter app project. The Flutter introduce the ListView Widget with a purpose to reduce the overload on different layouts performing the similar tasks in application.
. In this article, we will go through how to display two ListViews on One Screen in a flutter?

How to Display two ListViews on a One Screen In a Flutter?

The following code snippet shows two listview vertical directions on a single page, both ListView Data are from APIs.

return Scaffold(

appBar: AppBar(

title: const Text("Two List View One Screen"),

),

body: Row(

children: [

Flexible(

child: Container(

color: Colors.blueGrey,

child: ListView.builder(

itemCount: 30,

itemBuilder: (_, i) => ListTile(title: Text("List1: $i")),

),

),

),

Flexible(

child: Container(

color: Colors.lightGreen,

child: ListView.builder(

itemCount: 30,

itemBuilder: (_, i) => ListTile(title: Text("List2: $i")),

),

),

),

],

));

The following code snippet shows two listview horizontal directions on a single page:

return Scaffold(

appBar: AppBar(

title: const Text("Two List View One Screen"),

),

body: Column(

children: [

Flexible(

child: Container(

color: Colors.blueGrey,

child: ListView.builder(

itemCount: 30,

itemBuilder: (_, i) => ListTile(title: Text("List1: $i")),

),

),

),

Flexible(

child: Container(

color: Colors.lightGreen,

child: ListView.builder(

itemCount: 30,

itemBuilder: (_, i) => ListTile(title: Text("List2: $i")),

),

),

),

],

));

Output

Conclusion:

Thanks for Reading !!!

Kindly drop your suggestion/feedback to serve you much better.

One of the leading Flutter development company Flutter Agency is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget GuideFlutter ProjectsCode libs and etc.

Upvote


user
Created by

Flutter Agency

Flutter Agency is the US Leading Flutter app development company build innovative and cutting-edge desktop apps and mobile apps using Flutter framework. Contact us today to get started!


people
Post

Upvote

Downvote

Comment

Bookmark

Share


Related Articles