NumberInText class final

The first number in a text ("1,204", "-3.5", "$12.50" → 12.50) and how it is written: what is around it, its decimals and whether its thousands are grouped. A text's number counts (AnimationTrack.lerpValue): each value between is written the same way (format).

Annotations
  • @immutable

Constructors

NumberInText(String prefix, double value, String suffix, {required int decimals, required bool grouped})
const

Properties

decimals → int
final
grouped → bool
final
hashCode → int
The hash code for this object.
no setterinherited
prefix → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
suffix → String
final
value → double
final

Methods

format(double v) → String
The text with v in place of the number, written the same way. v is first rounded to six places past decimals, so a value a clock computes a hair under a half (0.3 / 0.4 of a run) rounds as the half.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

parse(String text) → NumberInText?
The number in text, or null when it has none.