PiButton constructor

const PiButton({
  1. required void onTap()?,
  2. void onDoubleTap()?,
  3. void onLongPress()?,
  4. String? label,
  5. Widget? iconPreffix,
  6. Widget? iconSuffix,
  7. PiButtonShape shape,
  8. PiButtonColor color,
  9. PiButtonSize size,
  10. PiButtonState state,
  11. PiButtonLayout layout,
  12. PiButtonType type,
  13. PiButtonLoadingType loadingType,
})

V Button This file defines the PiButton widget which is a customizable button component with various styles, shapes, sizes, and states.

Example usage:

PiButton(
  onTap: () {
    print("Button Tapped!");
  },
  label: "Primary Button",
  type: PiButtonType.PRIMARY,
  size: PiButtonSize.MEDIUM,
  shape: PiButtonShape.ROUNDED,
  state: PiButtonState.SUCCESS,
  loadingType: PiButtonLoadingType.CIRCULAR,
)

Implementation

const factory PiButton({
  required void Function()? onTap,
  void Function()? onDoubleTap,
  void Function()? onLongPress,
  String? label,
  Widget? iconPreffix,
  Widget? iconSuffix,
  PiButtonShape shape,
  PiButtonColor color,
  PiButtonSize size,
  PiButtonState state,
  PiButtonLayout layout,
  PiButtonType type,
  PiButtonLoadingType loadingType,
}) = _DefaultPiButton;