AnimatedTextSequence constructor
const
AnimatedTextSequence({
- Key? key,
- required List<
SequenceText> texts, - TextEffectController? controller,
- TextStyle? style,
- TextAlign textAlign = TextAlign.start,
- bool autoplay = true,
- bool repeat = true,
- TextDirection textDirection = TextDirection.ltr,
- StrutStyle? strutStyle,
- TextHeightBehavior? textHeightBehavior,
- TextWidthBasis textWidthBasis = TextWidthBasis.parent,
- bool keepAlive = true,
- Duration displayDuration = const Duration(seconds: 3),
- Duration transitionDuration = const Duration(milliseconds: 500),
- 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,
});