SketchyModel constructor

SketchyModel({
  1. required String paragraph,
  2. required List<SketchySentance> highlightSentances,
})

Creates a SketchyModel instance.

  • paragraph: The main paragraph text.
  • highlightSentances: A list of sentences or phrases to be styled.

Implementation

SketchyModel({
  required this.paragraph,
  required List<SketchySentance> highlightSentances,
}) : highlightSentances = List.generate(
       highlightSentances.length,
       (index) => SketchySentance(
         text: highlightSentances[index].text,
         sketchyType: highlightSentances[index].sketchyType,
         sketchyColor: highlightSentances[index].sketchyColor,
         textStyle: highlightSentances[index].textStyle,
         duration: highlightSentances[index].duration,
         onTap: highlightSentances[index].onTap,
       ),
     );