DraftModeUIButton.icon constructor

DraftModeUIButton.icon(
  1. IconData icon, {
  2. Key? key,
  3. Widget? pendingChild,
  4. bool isPending = false,
  5. VoidCallback? onPressed,
  6. DraftModeUIButtonSize size = DraftModeUIButtonSize.medium,
  7. DraftModeUIButtonVariant variant = DraftModeUIButtonVariant.plain,
  8. Color? backgroundColor,
  9. Color? textColor,
  10. bool stretched = false,
  11. EdgeInsetsGeometry? padding,
  12. bool autoPending = false,
})

Creates an icon-only button. Defaults to DraftModeUIButtonVariant.plain and stretched false.

Implementation

factory DraftModeUIButton.icon(
  IconData icon, {
  Key? key,
  Widget? pendingChild,
  bool isPending = false,
  VoidCallback? onPressed,
  DraftModeUIButtonSize size = DraftModeUIButtonSize.medium,
  DraftModeUIButtonVariant variant = DraftModeUIButtonVariant.plain,
  Color? backgroundColor,
  Color? textColor,
  bool stretched = false,
  EdgeInsetsGeometry? padding,
  bool autoPending = false,
}) {
  return _DraftModeUIButtonIcon(
    key: key,
    icon: icon,
    pendingChild: pendingChild,
    isPending: isPending,
    onPressed: onPressed,
    size: size,
    variant: variant,
    backgroundColor: backgroundColor,
    textColor: textColor,
    stretched: stretched,
    padding: padding,
    autoPending: autoPending,
  );
}