usageByModelFromJson function
Parses a byModel map from raw JSON; entries that are not
string → object pairs are skipped (tolerant reader).
Implementation
Map<String, UsageModelTotals> usageByModelFromJson(Object? raw) => {
if (raw is Map)
for (final entry in raw.entries)
if (entry.value is Map)
entry.key as String: UsageModelTotals.totalsFrom(
(entry.value as Map).cast<String, dynamic>(),
),
};