parse method
Parses input and returns the numeric value.
Throws FormatException when input cannot be parsed by this codec.
Implementation
@override
int parse(String input) {
final trimmed = input.trim();
if (trimmed.isEmpty) {
throw FormatException('Expected a byte size.', input);
}
final match = _unitMatcher.match(trimmed);
final value = style.parse(match.number) * match.unit.scale;
return _parseWholeByteCount(value, input);
}