objFromMap<T> static method
T?
objFromMap<T>(
- dynamic data,
- T? returner(
- dynamic
Implementation
static T? objFromMap<T>(dynamic data, T? Function(dynamic) returner) {
if (data == null) {
return null;
}
try {
return returner(data);
} catch (e, s) {
if (Strapi.i.verbose) {
sPrint("error while parsing strapi object");
sPrint(e);
sPrint(s);
} else {
sPrint(
"ignoring a error while parsing a strapi object, set verbose to true to see the error");
}
}
}