DraftModeUIButton.text constructor

DraftModeUIButton.text(
  1. String text, {
  2. Key? key,
  3. Widget? pendingChild,
  4. bool isPending = false,
  5. VoidCallback? onPressed,
  6. DraftModeUIButtonSize size = DraftModeUIButtonSize.large,
  7. DraftModeUIButtonVariant variant = DraftModeUIButtonVariant.primary,
  8. Color? backgroundColor,
  9. Color? textColor,
  10. bool stretched = true,
  11. EdgeInsetsGeometry? padding,
  12. bool autoPending = false,
  13. TextStyle? textStyle,
  14. TextAlign? textAlign,
  15. int? maxLines,
  16. 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,
  );
}