SketchySentance constructor
SketchySentance({
- required String text,
- Color? sketchyColor,
- TextStyle? textStyle = const TextStyle(fontSize: 14, color: Colors.black, height: 1.25),
- Duration? duration,
- SketchyType sketchyType = SketchyType.highlight,
- VoidCallback? onTap,
Creates a SketchySentance instance.
text
: The text to be styled.sketchyColor
: The color used for the styling.textStyle
: The text style for the sentence or phrase.- startDelay: The delay before the styling animation starts.
duration
: The duration of the styling animation.sketchyType
: The type of styling to apply.onTap
: The callback function triggered when the user taps on the text.
Implementation
SketchySentance({
required this.text,
Color? sketchyColor,
this.textStyle = const TextStyle(
fontSize: 14,
color: Colors.black,
height: 1.25,
),
Duration? duration,
this.sketchyType = SketchyType.highlight,
this.onTap,
}) : sketchyColor = sketchyColor ?? _getDefaultColor(sketchyType),
duration = getDefaultDuration(sketchyType);