ScratchCard constructor

const ScratchCard({
  1. Key? key,
  2. required Widget prize,
  3. required Widget cover,
  4. VoidCallback? onThresholdReached,
  5. VoidCallback? onRevealed,
  6. double threshold = 0.6,
  7. double brushWidth = 36,
  8. Size size = const Size(280, 180),
  9. int columns = 48,
  10. int rows = 32,
  11. String semanticLabel = 'Scratch to reveal prize',
  12. double coverBorderRadius = 18,
})

Implementation

const ScratchCard({
  super.key,
  required this.prize,
  required this.cover,
  this.onThresholdReached,
  this.onRevealed,
  this.threshold = 0.6,
  this.brushWidth = 36,
  this.size = const Size(280, 180),
  this.columns = 48,
  this.rows = 32,
  this.semanticLabel = 'Scratch to reveal prize',
  this.coverBorderRadius = 18,
});