tryReadString method
Tries to read a string value from the source. If the value is not a
string, it returns null
.
Implementation
String? tryReadString(source, key) {
var value = readValue(source, key);
return isString(value) ? value as String : null;
}