convert method
Converts a unit with a specific name (e.g. ANGLE.degree) and value to all other units
Implementation
@override
void convert(T name, double? value) {
if (value == null) {
for (Unit unit in _unitList) {
unit.value = null;
unit.stringValue = null;
}
return;
}
// Reset previous values
for (var node in _nodeList) {
node.value = null;
}
// Start the conversion
_mapNodes[name]!.convert(value);
for (var i = 0; i < size; i++) {
_unitList[i].value = _nodeList[i].value;
}
}