ImagePackPackContent.fromJson constructor
Implementation
ImagePackPackContent.fromJson(Map<String, Object?> json)
: _json = Map.fromEntries(
json.entries.where(
(e) =>
!['display_name', 'avatar_url', 'attribution'].contains(e.key),
),
),
displayName = json.tryGet('display_name'),
// we default to an invalid uri
avatarUrl = Uri.tryParse(json.tryGet('avatar_url') ?? '.::'),
usage = imagePackUsageFromJson(json.tryGetList<String>('usage')),
attribution = json.tryGet('attribution');