RollingTextEffect class
Rolls each character with a tape of characters individually
to form the newText from the oldText.
Constructors
-
RollingTextEffect({required String oldText, required String newText, EdgeInsets padding = EdgeInsets.zero, SymbolTapeStrategy tapeStrategy = const ConsistentSymbolTapeStrategy(0), Clip clipBehavior = Clip.hardEdge, Curve? tapeCurve, TapeSlideDirection tapeSlideDirection = TapeSlideDirection.up, bool staggerTapes = true, int staggerSoftness = 1, bool reverseStaggerDirection = false, double? fixedTapeWidth, Duration? widthDuration, Curve? widthCurve, TextStyle? style, StrutStyle? strutStyle, TextAlign? textAlign, TextDirection? textDirection, Locale? locale, bool? softWrap, TextOverflow? overflow, TextScaler? textScaler, int? maxLines, String? semanticsLabel, TextWidthBasis? textWidthBasis, TextHeightBehavior? textHeightBehavior, Color? selectionColor})
-
Creates a RollingTextEffect.
const
Properties
-
clipBehavior
→ Clip
-
Determines how the text should be clipped. The rendered text is
going to be a fixed-height box based on the font size.
final
-
fixedTapeWidth
→ double?
-
Can be optionally used to set a fixed width for each tape.
If null, the width of each tape will be the width of the active
character in the tape.
If not null, the width of each tape will be the fixed width provided.
Note that this will allow the text's characters to potentially
overlap each other.
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
locale
→ Locale?
-
Used to select a font when the same Unicode character can
be rendered differently, depending on the locale.
final
-
maxLines
→ int?
-
An optional maximum number of lines for the text to span, wrapping if necessary.
If the text exceeds the given number of lines, it will be truncated according
to overflow.
final
-
newText
→ String
-
The text to display interpolating to.
final
-
oldText
→ String
-
The text to display interpolating away from.
final
-
overflow
→ TextOverflow?
-
How visual overflow should be handled.
final
-
padding
→ EdgeInsets
-
Internal padding to apply between the row of symbol tapes and
the clipping mask.
final
-
props
→ List<Object?>
-
The list of properties that will be used to determine whether
two instances are equal.
no setter
-
reverseStaggerDirection
→ bool
-
Determines whether the stagger effect should be reversed.
Normally, the staggering makes the beginning letters move fast
and the ending letters move slow. If this is set to true, the
staggering will be reversed, so the beginning letters will move
slow and the ending letters will move fast.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectionColor
→ Color?
-
The color to use when painting the selection.
final
-
semanticsLabel
→ String?
-
An alternative semantics label for this text.
final
-
softWrap
→ bool?
-
Whether the text should break at soft line breaks.
final
-
staggerSoftness
→ int
-
Determines how harsh the stagger effect is. The higher the number,
the more the stagger effect is softened,
and the interpolation between each tape will more similar to each
other.
final
-
staggerTapes
→ bool
-
Determines whether the tapes should be staggered or not.
If set to true, the starting tapes will move and end their sliding
faster than the ending tapes.
final
-
stringify
→ bool?
-
If set to
true
, the toString method will be overridden to output
this instance's props.
no setterinherited
-
strutStyle
→ StrutStyle?
-
The strut style to use. Strut style defines the strut, which sets minimum
vertical layout metrics.
final
-
style
→ TextStyle?
-
If non-null, the style to use for this text.
final
-
tapeCurve
→ Curve?
-
Used to determine the curve each roll of symbol tape uses to slide up
and down through its characters. If null, the same curve is used as
the one provided to the
animate
function.
final
-
tapeSlideDirection
→ TapeSlideDirection
-
Determines the direction in which each tape of characters will
slide.
final
-
tapeStrategy
→ SymbolTapeStrategy
-
Used to determine the string of characters to create and
roll through for each character index between the old and
new text.
final
-
textAlign
→ TextAlign?
-
How the text should be aligned horizontally.
final
-
textDirection
→ TextDirection?
-
The directionality of the text.
final
-
textHeightBehavior
→ TextHeightBehavior?
-
Defines how to apply TextStyle.height over and under text.
final
-
textScaler
→ TextScaler?
-
The font scaling strategy to use when laying out and rendering the text.
final
-
textSpan
→ InlineSpan?
-
The text to display as a InlineSpan.
final
-
textWidthBasis
→ TextWidthBasis?
-
Defines how to measure the width of the rendered text.
final
-
widthCurve
→ Curve?
-
The widthCurve parameter is used to determine the curve of the
width animation of each tape.
If null, the same curve is used as the one provided to the
animate
function.
final
-
widthDuration
→ Duration?
-
The widthDuration parameter is used to determine the duration of the
width animation of each tape.
If null, the same duration is used as the one provided to the
animate
function.
final