scratcher
2.5.0, released 3 years ago by vaultomb.com
Scratch card widget which temporarily hides content from the user.
What it does
Provides a scratch card widget that covers content with a solid color or custom image, allowing users to scratch it away to reveal what's underneath. It supports tracking progress, threshold callbacks, and programmatic control.
AI-written summary of version 2.5.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to build a scratch-off game or promotional feature in your app
- You need to temporarily hide content until the user interacts with it
Skip it when
- You need complex physics or game engines
- You are targeting web platforms other than CanvasKit
Strengths
- Supports custom cover images and solid colors
- Tracks scratch progress and triggers callbacks on threshold
- Programmatic control with reset and reveal methods
Weaknesses
- Web support is limited to CanvasKit only
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Scratcher(
brushSize: 30,
threshold: 50,
color: Colors.red,
onChange: (value) => print("Scratch progress: $value%"),
onThreshold: () => print("Threshold reached, you won!"),
child: Container(
height: 300,
width: 300,
color: Colors.blue,
),
)Alternatives
Packages that do the same job and could replace scratcher.
- draw_your_image
A Flutter widget for creating customizable drawing canvases with a declarative API.
70Compare - swipable_stack
A widget for stacking cards that users can swipe horizontally and vertically.
50Compare - flutter_sliding_up_panel
A sliding up panel widget to show or hide content.
50Compare - coupon_uikit
A UI kit providing custom clippers and widgets to implement coupon card shapes.
59Compare