OutlinedButton constructor

OutlinedButton({
  1. Key? key,
  2. required VoidCallback? onPressed,
  3. VoidCallback? onLongPress,
  4. ValueChanged<bool>? onHover,
  5. ValueChanged<bool>? onFocusChange,
  6. ButtonStyle? style,
  7. FocusNode? focusNode,
  8. bool autofocus = false,
  9. Clip clipBehavior = Clip.none,
  10. WidgetStatesController? statesController,
  11. bool busy = false,
  12. Color? busyColor,
  13. Duration? loadingDebounce,
  14. bool disabled = false,
  15. Color? color,
  16. BorderRadius? borderRadius,
  17. EdgeInsetsGeometry? padding,
  18. double? minWidth,
  19. double? height,
  20. double? borderWidth,
  21. bool? guessTextColor,
  22. Widget? child,
})

Implementation

OutlinedButton({
  super.key,
  required VoidCallback? onPressed,
  VoidCallback? onLongPress,
  ValueChanged<bool>? onHover,
  ValueChanged<bool>? onFocusChange,
  ButtonStyle? style,
  FocusNode? focusNode,
  bool autofocus = false,
  Clip clipBehavior = Clip.none,
  WidgetStatesController? statesController,
  this.busy = false,
  this.busyColor,
  this.loadingDebounce,
  bool disabled = false,
  Color? color,
  BorderRadius? borderRadius,
  EdgeInsetsGeometry? padding,
  double? minWidth,
  double? height,
  double? borderWidth,
  bool? guessTextColor,
  Widget? child,
}) : super(
        onPressed: (disabled || busy) ? null : onPressed,
        onLongPress: (disabled || busy) ? null : onLongPress,
        onHover: onHover,
        onFocusChange: onFocusChange,
        style: _resolveStyle(
          style: style,
          color: color,
          borderRadius: borderRadius,
          padding: padding,
          minWidth: minWidth,
          height: height,
          borderWidth: borderWidth,
        ),
        focusNode: focusNode,
        autofocus: autofocus,
        clipBehavior: clipBehavior,
        statesController: statesController,
        child: GBButtonChild(
          busy: busy,
          busyColor: busyColor,
          loadingDebounce: loadingDebounce,
          child: child ?? const SizedBox.shrink(),
        ),
      );