PiButton constructor
const
PiButton({
- required void onTap()?,
- void onDoubleTap()?,
- void onLongPress()?,
- String? label,
- Widget? iconPreffix,
- Widget? iconSuffix,
- PiButtonShape shape,
- PiButtonColor color,
- PiButtonSize size,
- PiButtonState state,
- PiButtonLayout layout,
- PiButtonType type,
- 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;