Converter<T> class abstract

The base class for all converters.

Implementers

Constructors

Converter(String id)
Creates a new converter.
const

Properties

category String
The id of the category of this unit.
no setter
categoryName String
The id of the category of this unit.
no setter
hashCode int
The hash code for this object.
no setteroverride
hasSymbol bool
Whether this unit has a symbol.
no setter
id String
The id of this unit.
final
name String
The localized name of this unit.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
symbol String
The localized symbol of this unit.
no setter

Methods

call(Converter<T> other, T value) → T
Convertes the given value from this unit to the other unit.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
to(Converter<T> other, T value) → T
Convertes the given value from this unit to the other unit.
toString() String
A string representation of this object.
override
typeCheckConverter<C extends Converter<T>>(Converter<T> other) → C
Throws an ArgumentError if the Types of the two Converters don't match and returns the casted converter otherwise.

Operators

operator ==(Object o) bool
The equality operator.
override

Static Properties

i18n Map<String, dynamic>
The translations for name and symbol.
getter/setter pair
locale String
The current locale for name and symbol.
getter/setter pair