stringFromJson static method
Implementation
static String? stringFromJson(Map<String, dynamic> json, String attribute,
{String? defaultValue}) {
try {
return json[attribute] != null
? json[attribute].toString()
: defaultValue;
} catch (e) {
throw Exception('Error while parsing $attribute[$e]');
}
}