convert function
Converts the given value
from the unit given by from
to the target unit given by to
.
Throws ArgumentError
if its not possible to
convert between the two units.
Implementation
double convert(Converter<num> from, Converter<num> to, num value) =>
from(to, value.toDouble()).toDouble();