Button constructor

Button({
  1. required String text,
  2. required VoidCallback onPressed,
  3. ButtonType type = ButtonType.primary,
  4. double width = double.infinity,
  5. double height = 40,
  6. double? elevation,
  7. double borderRadius = 4,
  8. VoidCallback? onLongPress,
  9. IconData? icon,
  10. bool isLoading = false,
})

Implementation

Button({
  required this.text,
  required this.onPressed,
  this.type = ButtonType.primary,
  this.width = double.infinity,
  this.height = 40,
  this.elevation,
  this.borderRadius = 4,
  this.onLongPress,
  this.icon,
  this.isLoading = false,
});