TypingTextAnimation constructor

const TypingTextAnimation({
  1. Key? key,
  2. required String text,
  3. TextStyle? style,
  4. Duration typingSpeed = const Duration(milliseconds: 100),
  5. Duration cursorBlinkSpeed = const Duration(milliseconds: 500),
  6. bool showCursor = true,
  7. Widget cursor = const Text('|', style: TextStyle(fontWeight: FontWeight.bold)),
  8. VoidCallback? onFinished,
})

Implementation

const TypingTextAnimation({
  Key? key,
  required this.text,
  this.style,
  this.typingSpeed = const Duration(milliseconds: 100), // Speed of each character appearing
  this.cursorBlinkSpeed = const Duration(milliseconds: 500),
  this.showCursor = true,
  this.cursor = const Text('|', style: TextStyle(fontWeight: FontWeight.bold)), // Default cursor
  this.onFinished,
}) : super(key: key);