TypeWriter class
New simple typewriter animation widget.
return TypeWriter.text(
text: 'Hello World',
duration: const Duration(milliseconds: 50),
};
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TypeWriter
Constructors
- TypeWriter({Key? key, bool enabled = true, void onFinished(TypeWriterValue value)?, required TypeWriterController? controller, required Widget builder(BuildContext, TypeWriterValue value)?})
- Constructor for TypeWriter.
- TypeWriter.text(String text, {Key? key, bool enabled = true, void onChanged(TypeWriterValue value)?, bool repeat = false, TextAlign? textAlign, TextStyle? style, int? maxLines, TextOverflow? overflow, String? semanticsLabel, bool? softWrap, StrutStyle? strutStyle, Locale? locale, TextDirection? textDirection, TextHeightBehavior? textHeightBehavior, TextWidthBasis? textWidthBasis, Color? selectionColor, bool maintainSize = true, Alignment? alignment, void onFinished(TypeWriterValue value)?, required Duration duration})
- Constructor for TypeWriter.text.
Properties
- alignment → Alignment?
-
Alignment of the text layout.
final
- builder → (Widget Function(BuildContext, TypeWriterValue value)?)
-
Builder for the widget.
final
- controller → TypeWriterController?
-
Controller for the animation.
final
- duration → Duration
-
Delay time between each character
final
- enabled → bool
-
Is the flag to play the animation or not.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- locale → Locale?
-
Locale of the text.
final
- maintainSize → bool
-
Specifies whether the size of the layout text should be maintained.
final
- maxLines → int?
-
Maximum number of lines to be displayed.
final
- onChanged → (void Function(TypeWriterValue value)?)
-
Callback function for when the text is changed.
final
- onFinished → (void Function(TypeWriterValue value)?)
-
Callback function for when the animation is finished.
final
- overflow → TextOverflow?
-
Overflow behavior of the text.
final
- repeat → bool
-
Specifies whether the animation should repeat once completed (default is
false
).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionColor → Color?
-
Color of the selection.
final
- semanticsLabel → String?
-
Semantics label of the text.
final
- softWrap → bool?
-
Specifies whether the text should break at soft line breaks.
final
- strutStyle → StrutStyle?
-
Strut style of the text.
final
- style → TextStyle?
-
Style of the text.
final
-
text
→ Iterable<
String> -
The text to be displayed during the typewriter animation.
final
- textAlign → TextAlign?
-
Alignment of the text.
final
- textDirection → TextDirection?
-
Text direction of the text.
final
- textHeightBehavior → TextHeightBehavior?
-
Text height behavior of the text.
final
- textWidthBasis → TextWidthBasis?
-
Text width basis of the text.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< TypeWriter> -
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