getButtonBorder method

Border getButtonBorder()

Returns the appropriate border for the button based on its type.

If type is BtnType.outline, returns a border with the specified outlineColor or defaults to FxColor.gray200 with a width of 2.

If type is BtnType.outline2x, returns a border with the specified outlineColor or defaults to FxColor.gray200 with a width of 3.

If type is neither BtnType.outline nor BtnType.outline2x, returns a border with no style.

Implementation

Border getButtonBorder() {
  if (BtnType.outline == type) {
    return Border.all(
      color: outlineColor ?? color ?? FxColor.gray200,
      width: 2,
    );
  }
  if (BtnType.outline2x == type) {
    return Border.all(
      color: outlineColor ?? color ?? FxColor.gray200,
      width: 3,
    );
  }

  return Border.all(style: BorderStyle.none);
}