CustomButton constructor

const CustomButton({
  1. Key? key,
  2. required String text,
  3. String? subtext,
  4. Widget? icon,
  5. bool isEnabled = true,
  6. bool isPrimary = true,
  7. bool isWarning = false,
  8. bool isLoading = false,
  9. bool iconIsLeft = true,
  10. double horizontalPadding = 12.5,
  11. required dynamic onPressed(),
  12. TextStyle? textStyle,
  13. bool forceDarkMode = false,
  14. bool hasBorders = false,
})

Implementation

const CustomButton({
  super.key,
  required this.text,
  this.subtext,
  this.icon,
  this.isEnabled = true,
  this.isPrimary = true,
  this.isWarning = false,
  this.isLoading = false,
  this.iconIsLeft = true,
  this.horizontalPadding = 12.5,
  required this.onPressed,
  this.textStyle,
  this.forceDarkMode = false,
  this.hasBorders = false,
});