UiButton.outlined constructor

UiButton.outlined({
  1. Key? key,
  2. String? label,
  3. Widget? icon,
  4. required VoidCallback? onPressed,
  5. Color? borderColor,
  6. Color? foregroundColor,
  7. double borderRadius = 6,
  8. EdgeInsetsGeometry? padding,
  9. TextStyle? labelStyle,
  10. bool expand = false,
  11. String? tooltip,
})

Implementation

factory UiButton.outlined({
  Key? key,
  String? label,
  Widget? icon,
  required VoidCallback? onPressed,
  Color? borderColor,
  Color? foregroundColor,
  double borderRadius = 6,
  EdgeInsetsGeometry? padding,
  TextStyle? labelStyle,
  bool expand = false,
  String? tooltip,
}) {
  return UiButton._internal(
    key: key,
    label: label,
    icon: icon,
    onPressed: onPressed,
    expand: expand,
    tooltip: tooltip,
    type: _UiButtonType.outlined,
    borderColor: borderColor,
    style: OutlinedButton.styleFrom(
      side: BorderSide(color: borderColor ?? primary, width: 1.2),
      foregroundColor: foregroundColor ?? borderColor ?? primary,
      padding:
          padding ?? const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(borderRadius),
      ),
      textStyle: labelStyle ??
          const TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
    ),
  );
}