doParse method

  1. @override
Decimal? doParse(
  1. String? parseValue
)
override

Implementation

@override
Decimal? doParse(String? parseValue) {
  final String? _newValue = parseValue;

  if (_newValue == null) {
    return null;
  }

  final Decimal? _decimalValue = Decimal.tryParse(_newValue);

  if (_decimalValue != null) {
    return _decimalValue;
  }

  final _decimalValueWithReplace =
      Decimal.tryParse(_newValue.replaceAll(",", "."));
  if (_decimalValueWithReplace != null) {
    return _decimalValueWithReplace;
  }

  return null;
}