outlinedButton static method

Widget outlinedButton(
  1. String text, {
  2. double? width,
  3. double? height,
  4. double? size,
  5. Color color = Colors.white,
  6. Color sideColor = Colors.black12,
  7. Color bgColor = Colors.transparent,
  8. double fontSize = buttonFontSize,
  9. double radius = buttonRadius,
  10. VoidCallback? onPressed,
  11. AlignmentGeometry? alignment,
  12. EdgeInsetsGeometry padding = const EdgeInsets.all(8.0),
  13. double borderWidth = dividerSize,
})

Implementation

static Widget outlinedButton(String text,
    {double? width,
    double? height,
    double? size,
    Color color = Colors.white,
    Color sideColor = Colors.black12,
    Color bgColor = Colors.transparent,
    double fontSize = buttonFontSize,
    double radius = buttonRadius,
    VoidCallback? onPressed,
    AlignmentGeometry? alignment,
    EdgeInsetsGeometry padding = const EdgeInsets.all(8.0),
    double borderWidth = dividerSize}) {
  return OutlinedButton(
      onPressed: onPressed,
      style: OutlinedButton.styleFrom(
          padding: padding,
          alignment: alignment,
          maximumSize: Size(size ?? width ?? double.infinity, size ?? height ?? double.infinity),
          minimumSize: Size(size ?? width ?? 0, size ?? height ?? 0),
          side: BorderSide(width: borderWidth, color: sideColor),
          backgroundColor: bgColor,
          shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(radius))),
      child: Text(
        text,
        textAlign: TextAlign.center,
        style: TextStyle(color: color, fontSize: fontSize),
      ));
}