FormMediaValue.fromJson constructor
FormMediaValue from the Json map map
.
Jsonマップmap
からFormMediaValueを作成します。
Implementation
factory FormMediaValue.fromJson(Map<String, Object?> map) {
final type = map.get(_kTypeKey, "");
return FormMediaValue(
type: FormMediaType.values.firstWhereOrNull((e) => e.name == type) ??
FormMediaType.image,
uri: Uri.tryParse(map.get(_kPathKey, "")),
);
}