getVerticalBar method

Widget getVerticalBar(
  1. Color barColor,
  2. double thickness, {
  3. EdgeInsetsGeometry? getVerticalBarPadding,
})

Creates a vertical divider bar with customizable color and thickness.

Displays a vertical line separator with configurable styling and padding. Useful for creating visual separations between horizontal elements.

Parameters:

  • barColor: Color of the divider line.
  • thickness: Width/thickness of the divider line.
  • getVerticalBarPadding: Optional padding around the divider. Defaults to Utils.appConstants.getVerticalBarPadding.

Returns a Padding widget containing a VerticalDivider.

Example:

Row(
  children: [
    Text('Left'),
    getVerticalBar(Colors.grey, 2),
    Text('Right'),
  ],
)

Implementation

Widget getVerticalBar(Color barColor, double thickness,
    {EdgeInsetsGeometry? getVerticalBarPadding}) {
  return Padding(
    padding:
        getVerticalBarPadding ?? Utils.appConstants.getVerticalBarPadding,
    child: VerticalDivider(
      color: barColor,
      thickness: thickness,
    ),
  );
}