toResponseWithKey static method

HttpResponse toResponseWithKey({
  1. dynamic from,
  2. required String key,
})

Implementation

static HttpResponse toResponseWithKey({dynamic from, required String key}) {
  var json = tryCast<Map<Object?, Object?>>(from);
  var response = tryCast<Map<Object?, Object?>>(json?[key]);
  return toResponse(from: response);
}