SpoilerConfig class

Configuration for the spoiler effect.

This class defines the behavior and appearance of the spoiler animation, including particle properties, fade effects, and gesture interactions.

Implementers
Annotations

Constructors

SpoilerConfig.new({required double particleDensity, required double particleSpeed, required Color particleColor, required double maxParticleSize, required bool enableFadeAnimation, required double fadeRadius, required bool isEnabled, required bool enableGestureReveal, SpoilerMask? maskConfig, ValueChanged<bool>? onSpoilerVisibilityChanged})
const
SpoilerConfig.defaultConfig()
Returns a default configuration for the spoiler effect.
factory

Properties

enableFadeAnimation bool
Determines whether the particles will fade out over time.
final
enableGestureReveal bool
Determines whether user gestures can be used to reveal the spoiler.
final
fadeRadius double
The radius over which the fade effect is applied.
final
hashCode int
The hash code for this object.
no setterinherited
isEnabled bool
Controls whether the spoiler effect is active.
final
maskConfig SpoilerMask?
Optional configuration for applying a custom mask to the spoiler.
final
maxParticleSize double
The maximum size a particle can have.
final
onSpoilerVisibilityChanged ValueChanged<bool>?
Optional callback that is invoked when the visibility of the spoiler changes.
final
particleColor Color
The color of the particles.
final
particleDensity double
The density of the particles, affecting the number of particles displayed.
final
particleSpeed double
The speed at which particles move.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({double? particleDensity, double? particleSpeed, Color? particleColor, double? maxParticleSize, bool? enableFadeAnimation, double? fadeRadius, bool? isEnabled, bool? enableGestureReveal, SpoilerMask? maskConfig, ValueChanged<bool>? onSpoilerVisibilityChanged}) SpoilerConfig
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited