DraftModeUIButton.text constructor
DraftModeUIButton.text(
- String text, {
- Key? key,
- Widget? pendingChild,
- bool isPending = false,
- VoidCallback? onPressed,
- DraftModeUIButtonSize size = DraftModeUIButtonSize.large,
- DraftModeUIButtonVariant variant = DraftModeUIButtonVariant.primary,
- Color? backgroundColor,
- Color? textColor,
- bool stretched = true,
- EdgeInsetsGeometry? padding,
- bool autoPending = false,
- TextStyle? textStyle,
- TextAlign? textAlign,
- int? maxLines,
- TextOverflow? overflow,
Creates a button that renders the provided text with DraftMode sizing
tokens. Callers can override the generated Text styling via
textStyle, textAlign, maxLines, or overflow.
Implementation
factory DraftModeUIButton.text(
String text, {
Key? key,
Widget? pendingChild,
bool isPending = false,
VoidCallback? onPressed,
DraftModeUIButtonSize size = DraftModeUIButtonSize.large,
DraftModeUIButtonVariant variant = DraftModeUIButtonVariant.primary,
Color? backgroundColor,
Color? textColor,
bool stretched = true,
EdgeInsetsGeometry? padding,
bool autoPending = false,
TextStyle? textStyle,
TextAlign? textAlign,
int? maxLines,
TextOverflow? overflow,
}) {
return _DraftModeUIButtonText(
key: key,
label: text,
pendingChild: pendingChild,
isPending: isPending,
onPressed: onPressed,
size: size,
variant: variant,
backgroundColor: backgroundColor,
textColor: textColor,
stretched: stretched,
padding: padding,
autoPending: autoPending,
textStyle: textStyle,
textAlign: textAlign,
maxLines: maxLines,
overflow: overflow,
);
}