RatioConverter class abstract
A numerical converter that can be expressed as a ratio to the base unit.
- Inheritance
- Implementers
Constructors
- RatioConverter(String id, {required double r, ConversionFn? f, ConversionFn? b})
-
Creates a numerical converter that can be expressed as a
ratio to the base unit.
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?
-
A custom conversion function to convert from the base unit.
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
- ratio → double
-
The conversion ratio to the base unit.
final
- reverse → ConversionFn?
-
A custom conversion function to convert 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