PreviewForUrl.fromJson constructor
Implementation
PreviewForUrl.fromJson(Map<String, Object?> json)
: matrixImageSize = ((v) =>
v != null ? v as int : null)(json['matrix:image:size']),
ogImage = ((v) =>
v != null ? Uri.parse(v as String) : null)(json['og:image']),
additionalProperties = Map.fromEntries(
json.entries
.where((e) => !['matrix:image:size', 'og:image'].contains(e.key))
.map((e) => MapEntry(e.key, e.value as Object?)),
);