ggbutton function

Widget ggbutton({
  1. required Style style,
  2. String text = "",
  3. List<Widget> children = const [],
  4. Widget? leftChild,
  5. Widget? rightChild,
  6. Widget? topChild,
  7. Widget? bottomChild,
  8. void onTap()?,
  9. void onDoubleTap()?,
  10. void onLongPress()?,
  11. void onTapDown(
    1. TapDownDetails
    )?,
  12. void onTapUp(
    1. TapUpDetails
    )?,
  13. void onTapCancel()?,
  14. void onSecondaryTap()?,
  15. void onSecondaryTapUp(
    1. TapUpDetails
    )?,
  16. void onSecondaryTapDown(
    1. TapDownDetails
    )?,
  17. void onSecondaryTapCancel()?,
  18. void onHighlightChanged(
    1. bool
    )?,
  19. void onHover(
    1. bool
    )?,
  20. MouseCursor? mouseCursor,
  21. Color? focusColor,
  22. Color? hoverColor,
  23. Color? highlightColor,
  24. MaterialStateProperty<Color?>? overlayColor,
  25. Color? splashColor,
  26. InteractiveInkFeatureFactory? splashFactory,
  27. double? radius,
  28. BorderRadius? borderRadius,
  29. ShapeBorder? customBorder,
  30. bool? enableFeedback = true,
  31. bool excludeFromSemantics = false,
  32. FocusNode? focusNode,
  33. bool canRequestFocus = true,
  34. void onFocusChange(
    1. bool
    )?,
  35. bool autofocus = false,
  36. MaterialStatesController? statesController,
  37. Duration? hoverDuration,
  38. double gap = 8,
})

Implementation

Widget ggbutton(
    {required Style style,
    String text = "",
    List<Widget> children = const [],
    Widget? leftChild,
    Widget? rightChild,
    Widget? topChild,
    Widget? bottomChild,
    void Function()? onTap,
    void Function()? onDoubleTap,
    void Function()? onLongPress,
    void Function(TapDownDetails)? onTapDown,
    void Function(TapUpDetails)? onTapUp,
    void Function()? onTapCancel,
    void Function()? onSecondaryTap,
    void Function(TapUpDetails)? onSecondaryTapUp,
    void Function(TapDownDetails)? onSecondaryTapDown,
    void Function()? onSecondaryTapCancel,
    void Function(bool)? onHighlightChanged,
    void Function(bool)? onHover,
    MouseCursor? mouseCursor,
    Color? focusColor,
    Color? hoverColor,
    Color? highlightColor,
    MaterialStateProperty<Color?>? overlayColor,
    Color? splashColor,
    InteractiveInkFeatureFactory? splashFactory,
    double? radius,
    BorderRadius? borderRadius,
    ShapeBorder? customBorder,
    bool? enableFeedback = true,
    bool excludeFromSemantics = false,
    FocusNode? focusNode,
    bool canRequestFocus = true,
    void Function(bool)? onFocusChange,
    bool autofocus = false,
    MaterialStatesController? statesController,
    Duration? hoverDuration,
    double gap = 8}) {
  Widget widget;

  ButtonProps props = ButtonProps(
    onDoubleTap: onDoubleTap,
    onLongPress: onLongPress,
    autofocus: autofocus,
    borderRadius: borderRadius,
    canRequestFocus: canRequestFocus,
    customBorder: customBorder,
    excludeFromSemantics: excludeFromSemantics,
    focusColor: focusColor,
    focusNode: focusNode,
    hoverColor: hoverColor,
    radius: radius,
    splashColor: splashColor,
    splashFactory: splashFactory,
    mouseCursor: mouseCursor,
    highlightColor: highlightColor,
    statesController: statesController,
    onHighlightChanged: onHighlightChanged,
    onHover: onHover,
    onTapCancel: onTapCancel,
    onTapDown: onTapDown,
    onTapUp: onTapUp,
    onSecondaryTap: onSecondaryTap,
    onSecondaryTapCancel: onSecondaryTapCancel,
    onSecondaryTapDown: onSecondaryTapDown,
    onSecondaryTapUp: onSecondaryTapUp,
    onFocusChange: onFocusChange,
    hoverDuration: hoverDuration,
    overlayColor: overlayColor,
  );

  if (children.isNotEmpty) {
    widget = flexManager(props: style, children: children);
  } else {
    widget = iconManager(
        style, leftChild, rightChild, gap, text, topChild, bottomChild);
  }
  return runManagerList(
      style: style, widgetOld: widget, onTap: onTap, props: props);
}