AnimatedTextSequence constructor

const AnimatedTextSequence({
  1. Key? key,
  2. required List<SequenceText> texts,
  3. TextEffectController? controller,
  4. TextStyle? style,
  5. TextAlign textAlign = TextAlign.start,
  6. bool autoplay = true,
  7. bool repeat = true,
  8. TextDirection textDirection = TextDirection.ltr,
  9. StrutStyle? strutStyle,
  10. TextHeightBehavior? textHeightBehavior,
  11. TextWidthBasis textWidthBasis = TextWidthBasis.parent,
  12. bool keepAlive = true,
  13. Duration displayDuration = const Duration(seconds: 3),
  14. Duration transitionDuration = const Duration(milliseconds: 500),
  15. TextEffect? transitionEffect,
})

Creates an AnimatedTextSequence cycling through texts.

texts — ordered list of SequenceText items (required). controller — optional external TextEffectController. style — base text style (overridable per item). textAlign — horizontal alignment. autoplay — whether playback starts on mount. repeat — whether the sequence loops (default true). textDirection — layout direction. strutStyle — optional strut for line height consistency. textHeightBehavior — optional height behavior override. textWidthBasis — how text width is computed. keepAlive — preserves state in scroll-off. displayDuration — how long each text is shown. transitionDuration — transition duration between texts. transitionEffect — optional effect during transitions.

Implementation

const AnimatedTextSequence({
  super.key,
  required this.texts,
  this.controller,
  this.style,
  this.textAlign = TextAlign.start,
  this.autoplay = true,
  this.repeat = true,
  this.textDirection = TextDirection.ltr,
  this.strutStyle,
  this.textHeightBehavior,
  this.textWidthBasis = TextWidthBasis.parent,
  this.keepAlive = true,
  this.displayDuration = const Duration(seconds: 3),
  this.transitionDuration = const Duration(milliseconds: 500),
  this.transitionEffect,
});