Eegi
Eegi

Reputation: 29

How to draw a vertical line between items in the list in Flutter?

How to draw a vertical line connected with dots between items in the ListView?

What I am trying to do is shown in this picture. I have a list of items and want to show users which items are already booked by connecting two dots with vertical line.

Upvotes: 2

Views: 1433

Answers (2)

Mithson
Mithson

Reputation: 1782

You can use Divider widget wherever you want like this,

 Divider(
                color: Colors.Y, // Y is your desired color
                thickness: X, // X is your int value 
              ),

Upvotes: 1

Abbasihsn
Abbasihsn

Reputation: 2171

You can try timelines: ^0.1.0 package. Add this to your package's pubspec.yaml file:

dependencies:
  timelines: ^[latest_version]

You can install packages from the command line:

flutter pub get

then use it based on the example here.

Upvotes: 1

Related Questions