SketchySentance class

Represents a sentence or phrase within a paragraph that should be styled.

This class defines the text, color, style, and animation properties for a highlighted portion of the paragraph.

Example:

SketchySentance(
  text: "highlighted text",
  sketchyColor: Colors.yellow,
  sketchyType: SketchyType.highlight,
  startDelay: Duration(seconds: 1),
  duration: Duration(milliseconds: 500),
  onTap: () {
     print("User clicked on highlighted text!");
  },
);

Constructors

SketchySentance.new({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.
SketchySentance.internalConstructor({required String text, required Color? sketchyColor, required TextStyle? textStyle, required Duration? startDelay, required Duration? duration, required SketchyType sketchyType, required VoidCallback? onTap})

Properties

duration Duration?
The duration of the styling animation.
final
hashCode int
The hash code for this object.
no setterinherited
onTap VoidCallback?
Callback function triggered when the user taps on the text.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sketchyColor Color?
The color used for the styling (e.g., highlight, underline, etc.).
final
sketchyType SketchyType
The type of styling to apply to the text.
final
startDelay Duration?
The delay before the styling animation starts.
getter/setter pair
text String
The text to be styled.
final
textStyle TextStyle?
The text style for the sentence or phrase.
final

Methods

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

Static Methods

getDefaultDuration(SketchyType type) Duration
Returns a default duration for each SketchyType animation.