string method
Implementation
String? string(String key) {
final value = map[key];
if (value == null) {
return null;
}
if (value is String) {
return value;
}
if (value is num || value is bool) {
return value.toString();
}
throw valueError(key, 'expected text, found ${describe(value)}.');
}