Reputation: 65
I am attempting to add vertical divider between the leading portion and the title of a ListTile.
I understand that Flutter now has a VerticalDivider widget, but I can't seem to get it to work properly with the ListTile. Example of what I am trying to do is attached.
This was tagged as a possible duplicate post, but it is not. Just because the other post has VerticalDivider in the title doesn't mean that it is asking the same question. Maybe the person who tagged it as a duplicate should actually read the post instead of just browse the title...
Upvotes: 1
Views: 1732
Reputation: 103541
You can just use a Row
widget inside the leading
property of the ListTile
ListTile(
leading: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.add_shopping_cart),
VerticalDivider(),
],
),
title: Text("QUICK REFERENCE"),
),
Upvotes: 8