MeasureFormat class
Configurable formatter for Measure string rendering.
Constructors
- MeasureFormat({int? fractionDigits = 2, bool trimTrailingZeros = true, String separator = ' ', MeasureValueFormatter? valueFormatter, MeasureUnitFormatter? unitFormatter})
-
const
Properties
- fractionDigits → int?
-
Number of fraction digits used by the default value formatter.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- separator → String
-
Separator between the value and the unit.
final
- trimTrailingZeros → bool
-
Whether trailing zeros should be trimmed.
final
- unitFormatter → MeasureUnitFormatter?
-
Optional custom unit formatter.
final
- valueFormatter → MeasureUnitFormatter?
-
Optional custom value formatter.
final
Methods
-
format(
Measure< Dimension> measure) → String -
Formats
measure. -
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
Constants
- defaultFormat → const MeasureFormat
- Default measure format.