FormMediaValue constructor
FormMediaValue({
- FormMediaType type = FormMediaType.image,
- String? path,
Class for values when handling media in forms.
Specify the media type in type
with FormMediaType. Specify the actual path in path
.
Since mutual conversion to Json is possible with FormMediaValue.fromJson or toJson, the data can be saved as is.
フォームでメディアを取り扱うときの値用のクラス。
type
にメディアのタイプをFormMediaTypeで指定します。path
に実際のパスを指定します。
FormMediaValue.fromJsonやtoJsonでJsonに相互変換が可能なので、このままデータとして保存することができます。
Implementation
factory FormMediaValue({
FormMediaType type = FormMediaType.image,
String? path,
}) {
return _FormMediaValue(
type: type,
path: path,
);
}