spoiler_widget 1.0.24
spoiler_widget: ^1.0.24 copied to clipboard
A Flutter package to create spoiler animations similar to the one used in Telegram, allowing you to hide sensitive or spoiler-filled content until it's tapped or clicked.
Changelog #
1.0.24 #
- Packaging:
- Removed a gitignored tracked file warning for
dart pub publish --dry-run.
- Removed a gitignored tracked file warning for
1.0.23 #
- Static analysis:
- Switched shader uniform color components to
.r/.g/.band replaced deprecated color value usage. - Updated the example app/test to avoid deprecated
SpoilerText. - Added file-level ignores where legacy config fields are intentionally exercised.
- Switched shader uniform color components to
- Docs:
- Refreshed README examples and configuration tables for current APIs.
- Added missing dartdoc comments across the public API.
- CI:
- Added
flutter analyzefor the package and example app. - Added
dart pub publish --dry-runfor publish validation.
- Added
1.0.22 #
- Testing & CI:
- Added unit/widget tests and golden coverage.
- Added GitHub Actions CI to run formatting, tests, goldens, and pana.
- Shader & Controller Stability:
- Avoid calling animation controllers after disposal during fade completion.
- Treat local particle shader paths as particle shaders for sprite binding.
1.0.21 #
- Selection & Rects:
- Selection now spans multiple text widgets as a single range.
- Line-based selection boxes replace per-character boxes.
- Whitespace skipping uses word runs to avoid full-line fill on spaces.
- Clearing
textSelectionrecomputes full spoiler rects.
1.0.20 #
- Particle Shapes:
- Added
ParticlePathPresetfor built-in/custom shapes. - Atlas sprites draw paths directly; shader samples a sprite when
shapePathis provided.
- Added
- Density Semantics:
densitynow represents coverage percentage in the range 0..1 (0%..100%) and is clamped.- Shader and atlas paths use the same coverage math, including shape area factors for consistent particle counts.
- Rendering:
- Atlas particles use modulated color blending to avoid sprite background artifacts.
- Removed the hard particle count cap (responsibility is on the developer).
1.0.19 #
-
New Features:
- Added
ShaderConfigto enable a variety of new spoiler effects through custom fragment shaders. - Included five new built-in shader effects:
ShaderConfig.bokehCover()– A soft, out-of-focus blur.ShaderConfig.liquidMetal()– A flowing, metallic distortion.ShaderConfig.glitchStripes()– A digital glitch with RGB-split stripes.ShaderConfig.mosaicCensor()– A pixelated censorship block effect.ShaderConfig.liquidSpectrum()– A vibrant, shifting spectrum distortion.
- Added
-
Refactoring:
- Deprecated direct particle and fade properties in
SpoilerConfig. - Introduced
ParticleConfigandFadeConfigto provide a more structured and extensible way to configure spoiler appearance and behavior. Legacy properties are now mapped to these new classes for backward compatibility.
- Deprecated direct particle and fade properties in
1.0.18 #
- Matrix translate fix
1.0.17 #
- Bumped minimum Flutter version to 3.27.0.
- Added support for
clipRSuperellipseanddrawRSuperellipseinSpoilerCanvas(via dynamic dispatch for compatibility).
1.0.16 #
- Refactored
SpoilerRenderObjectWidgetto useonClipPathandonPaintcallbacks, removing directSpoilerControllerdependency.
1.0.15 #
- Added
SpoilerTextFormFieldto keep native text field behaviors (cursor, context menu) while applying spoiler masks to selected ranges. - Added
SpoilerTextWrapperto wrap existing text widgets/subtrees with the spoiler effect. - Unified path/signature helpers for selections; small gesture and clipping fixes.
1.0.14 #
- new
onSpoilerVisibilityChangedmethod to listen visibility
1.0.13 #
- Support
maxLinesandisEllipsisfor TextPainter
1.0.12 #
SpoilerOverlayfirst blur render issueenableFadeAnimationfalse issue
1.0.11 #
Breaking Changes #
-
Class Renames:
SpoilerConfigurationrenamed toSpoilerConfigWidgetSpoilerConfigurationrenamed toWidgetSpoilerConfigTextSpoilerConfigurationrenamed toTextSpoilerConfig
-
Parameter Renaming:
speedOfParticlesrenamed toparticleSpeedfadeAnimationrenamed toenableFadeAnimationenableGesturerenamed toenableGestureRevealstylerenamed totextStyleinTextSpoilerConfigselectionrenamed totextSelectioninTextSpoilerConfig
-
New Features:
- Added
maskConfigto support advanced masking withPath,PathOperation, andoffset. - Added
textAligntoTextSpoilerConfigfor custom text alignment control.
- Added
1.0.10 #
Breaking Changes #
- Class Renames:
SpoilerWidgetrenamed toSpoilerOverlaySpoilerTextWidgetrenamed toSpoilerText
- Parameter Renaming:
configurationparameter changed toconfig
- Rendering Update:
- Replaced
RenderParagraphwithTextPainterfor better canvas performance
- Replaced
1.0.9 #
- A new
SpoilerSpotsControllerclass can schedule "wave" or "ripple" effects, causing particles to move outward from random origins within the spoiler bounds. - Reusable buffers in
drawRawAtlasreduce per-frame allocations, providing smoother animations. - Reorganized Core. Clearer Names & Docs.
1.0.8 #
- chore: added tags
- small fixes
1.0.7 #
- perf: Refactored particle rendering to use
drawRawAtlas, significantly improving performance for rendering large numbers of particles
1.0.6 #
- Gesture issue fixed
- start with already spoilered state in SpoilerTextWidget
- import refactor
1.0.5 #
- Added new SpoilerWidget widget to hide widgets below
1.0.4 #
- Added docs
1.0.3 #
- Position fix
1.0.1 #
- Added docs
1.0.0 #
- Initial release.
