INNER CODE UNIT · Dart

ScratchPainter

vintage/scratcher · lib/painter.dart:7

class ScratchPainter extends CustomPainter {
  ScratchPainter({
    required this.points,
    required this.color,
    required this.onDraw,
    this.image,
    this.imageFit,
  });

  /// List of revealed points from scratcher
  final List<ScratchPoint?> points;

  /// Background color of the scratch area
  final Color color;

  /// Callback called each time the painter is redraw
  final void Function(Size) onDraw;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…