Btn constructor

const Btn({
  1. Key? key,
  2. required String? text,
  3. VoidCallback? onPressed,
  4. Color? textColor,
  5. Color? bgColor,
  6. Color? shadowColor,
  7. Color? onSurface,
  8. Color? borderColor,
  9. Color? loaderColor,
  10. Color? decorationColor,
  11. bool hasBorder = true,
  12. bool isLoose = false,
  13. bool hasBold = false,
  14. bool isTextOnly = false,
  15. bool isLoading = false,
  16. double? decorationThickness,
  17. FontWeight? fontWeight,
  18. String? fontFamily,
  19. TextDecoration? textDecoration,
  20. double? radius,
  21. double? textSize,
  22. double? verticalPadding = 4,
  23. double? elevation,
  24. double? borderWidth = 1,
  25. double? width,
  26. double? height,
  27. Widget? preFix,
  28. Widget? postFix,
  29. Widget? loader,
  30. TextStyle? textStyle,
  31. ButtonStyle? style,
  32. EdgeInsetsGeometry? padding,
  33. Size? minimumSize,
  34. Size? maximumSize,
  35. Size? fixedSize,
  36. BorderSide? side,
  37. OutlinedBorder? shape,
  38. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.center,
  39. BtnConfig? config,
})

Implementation

const Btn({
  super.key,
  required this.text,
  this.onPressed,
  this.textColor,
  this.bgColor,
  this.shadowColor,
  this.onSurface,
  this.borderColor,
  this.loaderColor,
  this.decorationColor,
  this.hasBorder = true,
  this.isLoose = false,
  this.hasBold = false,
  this.isTextOnly = false,
  this.isLoading = false,
  this.decorationThickness,
  this.fontWeight,
  this.fontFamily,
  this.textDecoration,
  this.radius,
  this.textSize,
  this.verticalPadding = 4,
  this.elevation,
  this.borderWidth = 1,
  this.width,
  this.height,
  this.preFix,
  this.postFix,
  this.loader,
  this.textStyle,
  this.style,
  this.padding,
  this.minimumSize,
  this.maximumSize,
  this.fixedSize,
  this.side,
  this.shape,
  this.mainAxisAlignment = MainAxisAlignment.center,
  this.config,
});