ScratchCard constructor

const ScratchCard({
  1. Key? key,
  2. required Widget child,
  3. double brushSize = 40.0,
  4. Color coverColor = const Color(0xFFBDBDBD),
  5. double revealThreshold = 0.6,
  6. RevealCallback? onRevealed,
  7. double gridCellSize = 8.0,
})

Creates a ScratchCard.

child must not be null. brushSize controls how large each scratch stroke is, and revealThreshold (0..1) sets the auto-reveal threshold.

Implementation

const ScratchCard({
  super.key,
  required this.child,
  this.brushSize = 40.0,
  this.coverColor = const Color(0xFFBDBDBD),
  this.revealThreshold = 0.6,
  this.onRevealed,
  this.gridCellSize = 8.0,
});