In flutter, is there an option to draw a vertical line between components as in the image.
add this method anywhere.
_verticalDivider() => BoxDecoration(
border: Border(
right: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.5,
),
),
);
now wrap your content in container
Container(
decoration: _verticalDivider(),
child: //your widget code
);
import 'package:flutter/material.dart';
class VerticalDivider extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Container(
height: 30.0,
width: 1.0,
color: Colors.white30,
margin: const EdgeInsets.only(left: 10.0, right: 10.0),
);
}
}
You can use a vertical divider with a thickness of 1.
VerticalDivider(
thickness: 1,
color: Color(0xFFF6F4F4),
),
And if you can't se the vertical divider wrap the row a IntrinsicHeight widget.
Try to wrap it inside the Container
with some height as
Container(height: 80, child: VerticalDivider(color: Colors.red)),