Show Divider Between ListView ListTile Items in Flutter

Hello friends, Recently when I was working on ListView widget in flutter. Then I saw that for some of us(new developers in flutter ) is facing the problem to adding Horizontal Divider line between each List Item. So I think let’s make a tutorial on it, may be it will help someone. So in today’s tutorial we would learn about Show Divider Between ListView ListTile Items in Flutter in Android iOS application.

Contents in this project Show Divider Between ListView ListTile Items in Flutter :-

1. Open your project’s main.dart file and import material.dart package.

2. Creating our void main runApp() method, Here we would call our main MyApp class.

3. Creating our main MyApp extends StatelessWidget class.

4. Creating a List String Array named as fruits. We would use this List to show items of ListView.

5. Creating Widget Build area -> Material App -> Scaffold Widget -> ListView.builder() widget. After ListTile widget we would call the Divider() widget. The Divider widget would automatically draw a horizontal line between each list item.

6. Complete source code for main.dart file :-

Screenshot :-

Show Divider Between ListView ListTile Items in Flutter

Leave a Reply

Your email address will not be published. Required fields are marked *