toOutlinedButton method

Widget toOutlinedButton({
  1. VoidCallback? onTap,
  2. Color? bgEnableColor,
  3. Color? bgDisableColor,
  4. Color? borderColor,
})

Implementation

Widget toOutlinedButton({
  VoidCallback? onTap,
  Color? bgEnableColor,
  Color? bgDisableColor,
  Color? borderColor,
}) =>
    OutlinedButton(
      onPressed: onTap,
      style: OutlinedButton.styleFrom(
        backgroundColor: bgEnableColor ?? Colors.transparent,
        disabledBackgroundColor: bgDisableColor ?? Colors.transparent,
        padding: [12, 8].toEdgePaddingSymmetric(),
        shape: RoundedRectangleBorder(borderRadius: 8.toBorderRadiusAll()),
        side: BorderSide(
          color: onTap != null ? (borderColor ?? Colors.black) : Colors.grey,
          width: 1.3,
          strokeAlign: BorderSide.strokeAlignInside,
        ),
        shadowColor: Colors.transparent,
        elevation: 0.5,
      ),
      child: this,
    );