TextSpoilerConfig class

Configuration for the text-based spoiler effect.

This extends SpoilerConfig to provide additional customization options specific to text-based spoilers, such as styling, alignment, and text selection handling.

Inheritance
Annotations

Constructors

TextSpoilerConfig({TextStyle? textStyle, TextSelection? textSelection, TextAlign? textAlign, int? maxLines, bool? isEllipsis, double particleDensity = 20.0, double particleSpeed = 0.2, Color particleColor = Colors.white70, double maxParticleSize = 1.0, bool enableFadeAnimation = false, double fadeRadius = 10.0, double fadeEdgeThickness = 20.0, bool isEnabled = true, bool enableGestureReveal = false, SpoilerMask? maskConfig, ValueChanged<bool>? onSpoilerVisibilityChanged, ParticleConfig? particleConfig, FadeConfig? fadeConfig, ShaderConfig? shaderConfig})
Creates a text spoiler configuration with the specified parameters.

Properties

enableFadeAnimation → bool?
Determines whether the particles will fade out over time.
finalinherited
enableGestureReveal → bool
Determines whether user gestures can be used to reveal the spoiler.
finalinherited
fadeConfig → FadeConfig?
Fade configuration.
finalinherited
fadeEdgeThickness → double?
Padding near the fade radius where particles get brighter/larger in shader.
finalinherited
fadeRadius → double?
The padding over which the fade effect is applied.
finalinherited
hashCode → int
The hash code for this object.
no setteroverride
isEllipsis → bool?
Determines whether overflowing text should display an ellipsis ("…") at the end.
final
isEnabled → bool
Controls whether the spoiler effect is active.
finalinherited
maskConfig → SpoilerMask?
Optional configuration for applying a custom mask to the spoiler.
finalinherited
maxLines → int?
An optional maximum number of lines for the text to span, wrapping if necessary.
final
maxParticleSize → double?
The maximum size a particle can have.
finalinherited
onSpoilerVisibilityChanged → ValueChanged<bool>?
Optional callback that is invoked when the visibility of the spoiler changes.
finalinherited
particleColor → Color?
The color of the particles.
finalinherited
particleConfig → ParticleConfig
Particle configuration.
finalinherited
particleDensity → double?
The density of the particles, affecting the number of particles displayed.
finalinherited
particleSpeed → double?
The speed at which particles move.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shaderConfig → ShaderConfig?
Optional configuration for applying a custom shader to the spoiler.
finalinherited
textAlign → TextAlign?
The alignment of the text within the spoiler widget.
final
textSelection → TextSelection?
The selection range within the text.
final
textStyle → TextStyle?
The text style to be applied to the spoiler text.
final

Methods

copyWith({double? particleDensity, double? particleSpeed, Color? particleColor, double? maxParticleSize, bool? enableFadeAnimation, double? fadeRadius, double? fadeEdgeThickness, bool? isEnabled, bool? enableGestureReveal, ParticleConfig? particleConfig, FadeConfig? fadeConfig, SpoilerMask? maskConfig, ValueChanged<bool>? onSpoilerVisibilityChanged, ShaderConfig? shaderConfig, TextStyle? textStyle, TextSelection? textSelection, TextAlign? textAlign, int? maxLines, bool? isEllipsis}) → TextSpoilerConfig
override
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.
override