UnitFormat class abstract

Constructors

UnitFormat()

Properties

hashCode int
The hash code for this object.
no setterinherited
productUnitParser → Parser<Unit>
Returns a typed parser that produces a unit or a rational product of unit.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
singleUnitParser → Parser<Unit>
Returns a typed parser that produces a single unit.
no setter

Methods

alias(Unit unit, String alias) → void
Attaches a system-wide alias to this unit.
format(Unit unit) String
Formats the specified unit.
isValidIdentifier(String name) bool
Indicates if the specified name can be used as unit identifier.
label(Unit unit, String label) → void
Attaches a system-wide label to the specified unit.
nameFor(Unit unit) String?
Returns the name for the specified unit or null if product unit.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseProductUnit(String input) Unit
Parses a string to produce a unit or a rational product of unit.
parseSingleUnit(String input) Unit
Parses a string to produce a single unit.
toString() String
A string representation of this object.
inherited
unitFor(String name) Unit?
Returns the unit for the specified name.

Operators

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

Static Properties

asciiUnitFormat UnitFormat
Holds the ASCII unit format.
final
standardUnitFormat UnitFormat
Holds the standard unit format.
final

Static Methods

getInstance([String? inLocale]) UnitFormat
Returns the unit format for the specified locale.
getUCUMInstance() UnitFormat
Returns the UCUM international unit format; this format uses characters range 0000-007F exclusively and is not locale-sensitive.