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.new({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, bool isEnabled = true, bool enableGestureReveal = false, SpoilerMask? maskConfig, ValueChanged<bool>? onSpoilerVisibilityChanged})
Creates a text spoiler configuration with the specified parameters.
const

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
fadeRadius double
The radius over which the fade effect is applied.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
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
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
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, bool? isEnabled, bool? enableGestureReveal, SpoilerMask? maskConfig, ValueChanged<bool>? onSpoilerVisibilityChanged}) SpoilerConfig
inherited
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