PulsatingButton constructor

const PulsatingButton({
  1. Key? key,
  2. VoidCallback? onClick,
  3. @Deprecated('Usa onClick en su lugar') VoidCallback? onPressed,
  4. Color color = Colors.blue,
  5. Duration pulsationDuration = const Duration(milliseconds: 800),
  6. double width = 120.0,
  7. double height = 60.0,
  8. BoxBorder? border,
  9. BorderRadius? borderRadius = const BorderRadius.all(Radius.circular(12.0)),
  10. Widget? child,
  11. Curve curve = Curves.easeInOut,
  12. double pulsationSize = 12.0,
})

Crea un botón con efecto de pulsación continua.

El ciclo se ejecuta indefinidamente hasta que el widget se descarte.

Implementation

const PulsatingButton({
  super.key,
  this.onClick,
  @Deprecated('Usa onClick en su lugar') this.onPressed,
  this.color = Colors.blue,
  this.pulsationDuration = const Duration(milliseconds: 800),
  this.width = 120.0,
  this.height = 60.0,
  this.border,
  this.borderRadius = const BorderRadius.all(Radius.circular(12.0)),
  this.child,
  this.curve = Curves.easeInOut,
  this.pulsationSize = 12.0,
}) : assert(width > 0, 'width debe ser > 0'),
     assert(height > 0, 'height debe ser > 0'),
     assert(pulsationSize >= 0, 'pulsationSize debe ser >= 0');