Btn constructor

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

Implementation

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