toJson method
Implementation
Map<String, Object?> toJson() {
return {
...Map.from(_json)..remove('usage'),
if (displayName != null) 'display_name': displayName,
if (avatarUrl != null) 'avatar_url': avatarUrl.toString(),
if (usage != null)
'usage': imagePackUsageToJson(usage, _json.tryGetList<String>('usage')),
if (attribution != null) 'attribution': attribution,
};
}