parseString function
Parses a string from the given value and returns it as a String.
- Throws a FormatException if the
valueis empty.
Implementation
String parseString(final String value) {
if (value.isEmpty) {
throw const FormatException('Value cannot be empty');
}
return value.trim();
}