SketchySentance constructor

SketchySentance({
  1. required String text,
  2. Color? sketchyColor,
  3. TextStyle? textStyle = const TextStyle(fontSize: 14, color: Colors.black, height: 1.25),
  4. Duration? duration,
  5. SketchyType sketchyType = SketchyType.highlight,
  6. 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);