'Vertical divider inside ListTile header

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.

I am attempting to replicate this list tile in the attached image.

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...



Solution 1:[1]

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"),
        ),

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 diegoveloper