CustomConverter class abstract
A custom converter with function for both to base and from base conversions.
- Inheritance
- Implementers
Constructors
- CustomConverter(String id, {required ConversionFn f, required ConversionFn r})
-
Creates a custom converter with function for both
to base and from base conversions.
const
Properties
- category → String
-
The id of the category of this unit.
no setterinherited
- categoryName → String
-
The id of the category of this unit.
no setterinherited
- forward → ConversionFn
-
Converts the value from the base unit
to the unit of this.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSymbol → bool
-
Whether this unit has a symbol.
no setterinherited
- id → String
-
The id of this unit.
finalinherited
- name → String
-
The localized name of this unit.
no setterinherited
- reverse → ConversionFn
-
Converts the value to the base unit.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- symbol → String
-
The localized symbol of this unit.
no setterinherited
Methods
-
call(
Converter< double> other, double value) → double -
Convertes the given
value
from this unit to theother
unit.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
to(
Converter< double> other, double value) → double -
Convertes the given
value
from this unit to theother
unit.override -
toString(
) → String -
A string representation of this object.
inherited
-
typeCheckConverter<
C extends Converter< (T> >Converter< double> other) → C -
Throws an ArgumentError if the Types of the two Converters
don't match and returns the casted converter otherwise.
inherited
Operators
-
operator ==(
Object o) → bool -
The equality operator.
inherited