toMockApis static method

Map<String, MockAPIResponse> toMockApis(
  1. Map<String, Map<String, dynamic>> raw, {
  2. required String sourceLabel,
})

Implementation

static Map<String, MockAPIResponse> toMockApis(
  Map<String, Map<String, dynamic>> raw, {
  required String sourceLabel,
}) {
  return {
    for (final entry in raw.entries)
      entry.key: parseApiResponse(
        entry.value,
        sourceLabel: sourceLabel,
        apiName: entry.key,
      ),
  };
}