TButtonPrimary.icon constructor

const TButtonPrimary.icon({
  1. Key? key,
  2. required Widget icon,
  3. required VoidCallback? onPressed,
  4. VoidCallback? onLongPress,
  5. Duration? longPressDuration,
  6. Color? backgroundColor,
  7. Color? onPressedBackgroundColor,
  8. Color? loadingColor,
  9. double borderRadius = 8,
  10. TextStyle? textStyle,
  11. bool loading = false,
  12. bool centerContent = true,
  13. Size minimumSize = const Size(48, 48),
  14. Size maximumSize = const Size(48, 48),
  15. double minFontSize = 12.0,
  16. EdgeInsetsGeometry? padding = const EdgeInsets.only(top: 10, bottom: 10, left: 12, right: 12),
})

Implementation

const TButtonPrimary.icon({
  super.key,
  required Widget icon,
  required this.onPressed,
  this.onLongPress,
  this.longPressDuration,
  this.backgroundColor,
  this.onPressedBackgroundColor,
  this.loadingColor,
  this.borderRadius = 8,
  this.textStyle,
  this.loading = false,
  this.centerContent = true,
  this.minimumSize = const Size(48, 48),
  this.maximumSize = const Size(48, 48),
  this.minFontSize = 12.0,
  this.padding = const EdgeInsets.only(top: 10, bottom: 10, left: 12, right: 12),
})  : child = icon,
      text = null,
      suffixIcon = null,
      prefixIcon = null;