get method
Gets int value by unit
. Supports shorthand. Returns null if the unit
is not found.
Example:
get('date');
get('d');
Implementation
int? get(String unit) {
final processedUnit = Unit.fromShorthand(unit);
return _values.containsKey(processedUnit) ? _values[processedUnit] : null;
}