AgAppButton constructor

const AgAppButton({
  1. Key? key,
  2. required String text,
  3. required VoidCallback? onPressed,
  4. double textSize = 16,
  5. Color textColor = Colors.white,
  6. Widget? icon,
  7. bool isLoading = false,
  8. bool loaderOnLeading = false,
  9. Widget? loader,
  10. double borderRadius = 8.0,
  11. double height = 48,
  12. double? width,
  13. bool isGradient = false,
  14. Color? solidColor,
  15. List<Color>? gradientColors,
  16. bool isOutlined = false,
  17. Color borderColor = Colors.blue,
  18. double borderWidth = 1.5,
})

Creates an AgAppButton with flexible styling and behavior.

Implementation

const AgAppButton({
  Key? key,
  required this.text,
  required this.onPressed,
  this.textSize = 16,
  this.textColor = Colors.white,
  this.icon,
  this.isLoading = false,
  this.loaderOnLeading = false,
  this.loader,
  this.borderRadius = 8.0,
  this.height = 48,
  this.width,
  this.isGradient = false,
  this.solidColor,
  this.gradientColors,
  this.isOutlined = false,
  this.borderColor = Colors.blue,
  this.borderWidth = 1.5,
}) : super(key: key);