verticalDivider method

Widget verticalDivider({
  1. double? width,
  2. double? height,
  3. Color? color,
})

Creates a vertical divider widget with the specified width, height, and color.

The width parameter specifies the width of the divider. If not provided, it defaults to a standard width. The height parameter specifies the height of the divider. If not provided, it defaults to a standard height. The color parameter specifies the color of the divider. If not provided, it defaults to a standard color.

Example usage:

verticalDivider(width: 2.0, height: 50.0, color: Colors.black);

This will create a vertical divider with a width of 2.0, height of 50.0, and black color.

Implementation

Widget verticalDivider({
  double? width,
  double? height,
  Color? color,
}) {
  return Container(
    height: height ?? 20,
    width: width ?? 2,
    margin: const EdgeInsets.symmetric(horizontal: 8.0),
    color: color ?? Colors.black,
  );
}