How to solve: Flutter - Vertical Divider

Question

Asked by Praveen K on March 20, 2018 (source).

In flutter, is there an option to draw a vertical line between components as in the image.

enter image description here

Answer

Question answered by rmtmckenzie (source).

Not as far as I know. However, it is quite simple to create one — if you look at the source for Flutter's Divider you'll see that it is simply a SizedBox with a single (bottom) border. You could do the same but with dimensions switched.


Update (Oct 4, 2018): a VerticalDivider implementation has been merged in by the Flutter team. Check out the docs but it's very simple to use — simply put it between two other items in a row.

Note: If you are using VerticalDivider as separator in Row widget then wrap Row with IntrinsicHeight , Container or SizedBox else VerticalDivider will not show up. For Container and SizedBox widget you need define height.

FLUTTER
SHARE: