The ListTile shape property does’t appear to support setting a single border so I’ve used wrapped the ListTile in a Container. This works fine when there is no border radius however once you add a border radius the entire ListTile disappears.
Container(
decoration: BoxDecoration(
color: Colors.transparent,
border: Border(
left: BorderSide(
color: Colors.green,
width: 4
)
),
borderRadius: BorderRadius.circular(20),
),
child:
ListTile(
title: Text("Item1")
)
)
Runnable example here – https://dartpad.dev/?id=b545f068068456c63725205797a7d24b – just uncomment the border radius line and the ListTile will disappear.
2
Answers
Found a solution on a similar question related to the Card widget.
A border will work only on shape that doesn’t have a rounded radius. You can instead add a shadow and add an offset on x axis to move it a little to the left so it looks like a border