Btn constructor

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

Implementation

const Btn({
  super.key,
  required this.text,
  this.onPressed,
  this.textColor,
  this.bgColor,
  this.borderColor,
  this.decorationThickness,
  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
});