fromDynamic static method
Processes a Map or Map-like object into a response. If the map is null then this will return null.
Implementation
static LogResponse fromDynamic(
dynamic map,
String? message,
bool? success,
) {
late LogResponse result;
if (map == null) {
throw Exception('[LogResponse.fromDynamic]: map is null');
} else {
result = LogResponse(
message: message,
record: JsonLogRecord.fromDynamic(map['record']) ??
JsonLogRecord(level: Level.SEVERE, message: ''),
success: success,
);
}
return result;
}