TextAnimator class
The TextAnimator is a direct placement for the standard Text widget It makes use of the WidgetAnimator class to allow many different transition effects The class allows you to transition in individual characters or words together to create some cool effects
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TextAnimator
Constructors
- TextAnimator(String text, {Key? key, WidgetTransitionEffects? incomingEffect, WidgetTransitionEffects? outgoingEffect, WidgetRestingEffects? atRestEffect, dynamic onIncomingAnimationComplete(Key?)?, dynamic onOutgoingAnimationComplete(Key?)?, int? maxLines, TextAlign? textAlign, TextStyle? style, Duration? initialDelay, Duration? characterDelay, Duration? spaceDelay})
-
Standard constructor for the text animator
const
Properties
- atRestEffect → WidgetRestingEffects?
-
WidgetRestingEffects The effect to show when the text is not transitioning on or off the screen
final
- characterDelay → Duration?
-
Duration a delay to leave between each character of text to display to create a
staggered text animation effect, if you want words to appear at once, then set a Duration of zero
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- incomingEffect → WidgetTransitionEffects?
-
WidgetTransitionEffects The incoming effect to show when the text is first shown
final
- initialDelay → Duration?
-
A Duration delay before the text initially starts to show
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxLines → int?
-
int the maximum number of lines of text to show within the widget, used in the same way as the standard Text widget
final
- onIncomingAnimationComplete → (dynamic Function(Key?)?)
-
Function will be called when the last incoming animation character has completed its transition
final
- onOutgoingAnimationComplete → (dynamic Function(Key?)?)
-
Function will be called when the last outgoing animation character has completed its transition
final
- outgoingEffect → WidgetTransitionEffects?
-
WidgetTransitionEffects The outgoing effect to show when the text is about to be replaced
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spaceDelay → Duration?
-
Duration a delay to leave between each space/word
if set the same as the characterDelay the timing will be consistent for all characters
can be used to drive the timing per word if characterDelay is set to zero
final
- style → TextStyle?
-
The TextStyle of the text, in the same was it's used in the Text widget
final
- text → String
-
the String of text to display
final
- textAlign → TextAlign?
-
The TextAlign of the text, in the same was it's used in the Text widget
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< TextAnimator> -
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}) → 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