cft
Become a CreatorSign inGet Started

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

Ruben Gray

4 months ago | 4 min read
Follow

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

Ruben Gray

Follow

Digital Marketing Manager

Hi I am Rubeen


people
Post

Upvote

Downvote

Comment

Bookmark

Share


Related Articles