convert method

  1. @override
String? convert(
  1. String? input
)
override

Converts input and returns the result of the conversion.

Implementation

@override
String? convert(String? input) {
  if (input == null) {
    _lastWasBlank = false;
    return null;
  }

  if (input.isEmpty) {
    if (_lastWasBlank) {
      return null;
    } else {
      _lastWasBlank = true;
    }
  } else {
    _lastWasBlank = false;
  }

  return input;
}