scratch_to_win 0.2.2
scratch_to_win: ^0.2.2 copied to clipboard
Scratchable overlay to reveal hidden widgets with gestures and callbacks.
0.2.2 #
- Confetti: Added
confettiDuration(default 4s, matching the old controller),confettiMinChipSize/confettiMaxChipSize(defaults 20×10 … 30×15, matching legacy confetti widget chip bounds). - Brush: Texture stamps are clipped to a circle so the scratch tip no longer looks square when using
brushTexture. - Reveal assist:
revealAssistButtonLabelis nowString?; empty string hides the button even whenshowRevealAssistButtonis true (null still defaults the label toReveal).
0.2.1 #
- Replaced the
confettipackage with a built-in celebration overlay so particles spawn across the full width of the card (rain from above + sparkle in the upper area) instead of clustering from one corner.
0.2.0 #
- Simpler API: Removed velocity-based brush, brush shape options (only round stroke), and confetti tuning except
confettiParticleCount. Confetti uses an omnidirectional burst with built-in gravity and timing (rain-like). - Docs: Expanded
progressGridResolutiondocumentation on [ScratchToWin].
0.1.0 #
- Image overlay:
overlayImage+overlayImageFitto scratch off a bitmap instead of only color/gradient. - Brush texture:
brushTextureuses the image alpha (BlendMode.dstOut) for stamp-shaped erasing; shows plain clears while the image is still decoding. - Completion flair:
playConfettiOnThreshold,confettiParticleCount, and optionalplaySoundOnCompletionviacompletionSoundAssetorcompletionSoundUrl(audioplayers). - Reveal assist:
showRevealAssistButton,revealAssistButtonLabel,revealAssistPadding;ScratchToWinController.revealAll().
0.0.1 #
- Initial release:
ScratchToWinoverlay with scratch gestures, progress estimate, threshold callback, haptics, andScratchToWinControllerreset.