getVerticalLineDecorator method

BoxDecoration getVerticalLineDecorator()

Make vertical line to menu and submenu right side

Implementation

BoxDecoration getVerticalLineDecorator() {
  double actualBorderWidth = widget.verticalSeparatorThickness;
  if (widget.verticalSeparatorColor == Colors.transparent ||
      widget.verticalSeparatorThickness == 0) {
    actualBorderWidth = 0;
  }

  BorderSide borderSide = BorderSide(
    width: actualBorderWidth,
    color: widget.verticalSeparatorColor,
  );

  if (widget.menuLocation == MenuLocation.left) {
    return BoxDecoration(
      border: Border(
        right: borderSide,
      ),
    );
  } else {
    return BoxDecoration(
      border: Border(
        left: borderSide,
      ),
    );
  }
}