convertStringToJson static method
Converts a JSON string to a Map object
@param text The JSON string to convert @return The parsed Map object or null if conversion fails
Implementation
static Map<String, dynamic>? convertStringToJson(String? text) {
try {
if (isNullOrEmpty(text)) return {};
return jsonDecode(text!);
} catch (ex, s) {
Completer().completeError(ex, s);
return null;
}
}