DraftModeUIButton.label constructor

DraftModeUIButton.label(
  1. String text, {
  2. required IconData icon,
  3. Key? key,
  4. Widget? pendingChild,
  5. bool isPending = false,
  6. VoidCallback? onPressed,
  7. DraftModeUIButtonSize size = DraftModeUIButtonSize.large,
  8. DraftModeUIButtonVariant variant = DraftModeUIButtonVariant.primary,
  9. Color? backgroundColor,
  10. Color? textColor,
  11. bool stretched = true,
  12. EdgeInsetsGeometry? padding,
  13. bool autoPending = false,
  14. TextStyle? textStyle,
  15. double? gap,
})

Creates a button with an icon and text label arranged in a Row.

Implementation

factory DraftModeUIButton.label(
  String text, {
  required IconData icon,
  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,
  double? gap,
}) {
  return _DraftModeUIButtonLabel(
    key: key,
    label: text,
    icon: icon,
    gap: gap,
    pendingChild: pendingChild,
    isPending: isPending,
    onPressed: onPressed,
    size: size,
    variant: variant,
    backgroundColor: backgroundColor,
    textColor: textColor,
    stretched: stretched,
    padding: padding,
    autoPending: autoPending,
    textStyle: textStyle,
  );
}