TextSpoilerConfig constructor
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.
Inherits base properties from SpoilerConfig while adding text-specific customizations such as styling, alignment, and selection.
Implementation
TextSpoilerConfig({
this.textStyle,
this.textSelection,
this.textAlign,
this.maxLines,
this.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,
}) : super(
isEnabled: isEnabled,
enableGestureReveal: enableGestureReveal,
maskConfig: maskConfig,
onSpoilerVisibilityChanged: onSpoilerVisibilityChanged,
shaderConfig: shaderConfig,
particleConfig: particleConfig ??
ParticleConfig(
density: particleDensity,
speed: particleSpeed,
color: particleColor,
maxParticleSize: maxParticleSize,
),
fadeConfig: fadeConfig ??
(enableFadeAnimation
? FadeConfig(
padding: fadeRadius,
edgeThickness: fadeEdgeThickness,
)
: null),
);