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 ListDevicesResponse fromDynamic(
dynamic map,
String? message,
bool? success,
) {
late ListDevicesResponse result;
if (map == null) {
throw Exception('[ListDevicesResponse.fromDynamic]: map is null');
} else {
result = ListDevicesResponse(
devices: JsonClass.fromDynamicList(
map['devices'],
(map) => ConnectedDevice.fromDynamic(map),
) ??
<ConnectedDevice>[],
message: message,
success: success,
);
}
return result;
}