spoiler_widget 1.0.21 copy "spoiler_widget: ^1.0.21" to clipboard
spoiler_widget: ^1.0.21 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.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 textSelection recomputes full spoiler rects.

1.0.20 #

  • Particle Shapes:
    • Added ParticlePathPreset for built-in/custom shapes.
    • Atlas sprites draw paths directly; shader samples a sprite when shapePath is provided.
  • Density Semantics:
    • density now 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 ShaderConfig to 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.
  • Refactoring:

    • Deprecated direct particle and fade properties in SpoilerConfig.
    • Introduced ParticleConfig and FadeConfig to 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.

1.0.18 #

  • Matrix translate fix

1.0.17 #

  • Bumped minimum Flutter version to 3.27.0.
  • Added support for clipRSuperellipse and drawRSuperellipse in SpoilerCanvas (via dynamic dispatch for compatibility).

1.0.16 #

  • Refactored SpoilerRenderObjectWidget to use onClipPath and onPaint callbacks, removing direct SpoilerController dependency.

1.0.15 #

  • Added SpoilerTextFormField to keep native text field behaviors (cursor, context menu) while applying spoiler masks to selected ranges.
  • Added SpoilerTextWrapper to wrap existing text widgets/subtrees with the spoiler effect.
  • Unified path/signature helpers for selections; small gesture and clipping fixes.

1.0.14 #

  • new onSpoilerVisibilityChanged method to listen visibility

1.0.13 #

  • Support maxLines and isEllipsis for TextPainter

1.0.12 #

  • SpoilerOverlay first blur render issue
  • enableFadeAnimation false issue

1.0.11 #

Breaking Changes #

  • Class Renames:

    • SpoilerConfiguration renamed to SpoilerConfig
    • WidgetSpoilerConfiguration renamed to WidgetSpoilerConfig
    • TextSpoilerConfiguration renamed to TextSpoilerConfig
  • Parameter Renaming:

    • speedOfParticles renamed to particleSpeed
    • fadeAnimation renamed to enableFadeAnimation
    • enableGesture renamed to enableGestureReveal
    • style renamed to textStyle in TextSpoilerConfig
    • selection renamed to textSelection in TextSpoilerConfig
  • New Features:

    • Added maskConfig to support advanced masking with Path, PathOperation, and offset.
    • Added textAlign to TextSpoilerConfig for custom text alignment control.

1.0.10 #

Breaking Changes #

  • Class Renames:
    • SpoilerWidget renamed to SpoilerOverlay
    • SpoilerTextWidget renamed to SpoilerText
  • Parameter Renaming:
    • configuration parameter changed to config
  • Rendering Update:
    • Replaced RenderParagraph with TextPainter for better canvas performance

1.0.9 #

  • A new SpoilerSpotsController class can schedule "wave" or "ripple" effects, causing particles to move outward from random origins within the spoiler bounds.
  • Reusable buffers in drawRawAtlas reduce 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.
85
likes
0
points
844
downloads

Publisher

unverified uploader

Weekly Downloads

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.

Repository (GitHub)
View/report issues

Topics

#spoiler #text #particle #hidden #hide

License

unknown (license)

Dependencies

flutter

More

Packages that depend on spoiler_widget