LinkButton constructor

LinkButton({
  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. double minWidth = 74,
  17. double height = 56,
  18. bool withInk = true,
  19. required Widget child,
})

Implementation

LinkButton({
  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,
  this.disabled = false,
  this.color,
  this.minWidth = 74,
  this.height = 56,
  this.withInk = true,
  required Widget child,
}) : super(
        onPressed: (disabled || busy) ? null : onPressed,
        onLongPress: (disabled || busy) ? null : onLongPress,
        onHover: onHover,
        onFocusChange: onFocusChange,
        style: _resolveStyle(
          style: style,
          color: color,
          minWidth: minWidth,
          height: height,
          withInk: withInk,
        ),
        focusNode: focusNode,
        autofocus: autofocus,
        clipBehavior: clipBehavior,
        statesController: statesController,
        child: GBButtonChild(
          busy: busy,
          busyColor: busyColor ?? color,
          loadingDebounce: loadingDebounce,
          child: child,
        ),
      );