fromString method Null safety
- String jsonString
Implementation
static JSONObject? fromString(String jsonString) {
try {
return JSON.fromMap(json.decode(jsonString));
} catch (Exception) {
return null;
}
}
static JSONObject? fromString(String jsonString) {
try {
return JSON.fromMap(json.decode(jsonString));
} catch (Exception) {
return null;
}
}