asStringOrNull method
Returns the picked value as String or returns null
when the picked value isn't available
Parses the picked value as String. If the value is not already a String its Object.toString() will be called. This means that this method works for int, double and any other Object.
Implementation
String? asStringOrNull() {
if (value == null) return null;
try {
return _parse();
} catch (_) {
return null;
}
}