decodeModelOrNull<T> function
Implementation
T? decodeModelOrNull<T>(String jsonString, T Function(Map<String, dynamic> jsonMap) decode) {
try {
final map = jsonDecode(jsonString);
return decode(map);
} catch (e) {
return null;
}
}