AnimatedTextSequence class
Cycles through a list of SequenceText items with optional transitions between them.
Each item is displayed for displayDuration, after which a transition lasting transitionDuration switches to the next text. The transition reuses TextEffect classes — when transitionEffect is provided, it is applied to both the outgoing and incoming text as a whole.
AnimatedTextSequence(
texts: [
SequenceText('Hello', effects: [FadeEffect(), WaveEffect()]),
SequenceText('World', effects: [SlideEffect()]),
],
transitionEffect: FadeEffect(),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AnimatedTextSequence
Constructors
-
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.const
Properties
- autoplay → bool
-
Whether playback begins automatically on mount.
final
- controller → TextEffectController?
-
Optional external controller for shared playback orchestration.
final
- displayDuration → Duration
-
Duration each text is shown before transitioning to the next.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- keepAlive → bool
-
When true, animation state survives scroll-off in a lazy list.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- repeat → bool
-
Whether the sequence loops back to the first item after the last.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strutStyle → StrutStyle?
-
Optional strut style for consistent line height.
final
- style → TextStyle?
-
Base text style applied to all items (overridable per SequenceText).
final
- textAlign → TextAlign
-
Horizontal text alignment.
final
- textDirection → TextDirection
-
Text direction for layout.
final
- textHeightBehavior → TextHeightBehavior?
-
Optional text height behavior override.
final
-
texts
→ List<
SequenceText> -
Ordered list of SequenceText items to cycle through.
final
- textWidthBasis → TextWidthBasis
-
How text width is computed relative to the parent.
final
- transitionDuration → Duration
-
Duration of the crossfade/transition between texts.
final
- transitionEffect → TextEffect?
-
Optional TextEffect applied during the transition (both outgoing
and incoming text).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AnimatedTextSequence> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited