Upload class
Uploaded media.
- Annotations
-
- @freezed
Constructors
- Upload({@JsonKey(name: 'uid') required String uid, @JsonKey(name: 'created') @DateTimeConverter() required DateTime created, @JsonKey(name: 'size') required int size, @JsonKey(name: 'duration') int? duration, @JsonKey(name: 'name') required String name, @JsonKey(name: 'url') required String url, @JsonKey(name: 'preview') UploadPreview? preview, @JsonKey(name: 'content_type') required String contentType, @Default(false) @JsonKey(name: 'animated') bool? animated, @JsonKey(name: 'blurhash') String? blurhash, @Default(false) @JsonKey(name: 'processing') bool? processing, @JsonKey(name: 'pdf_version') PdfVersion? pdfVersion, @JsonKey(name: 'type') required String mediaType})
-
constfactory
-
Upload.fromJson(Map<
String, dynamic> json) -
factory
Properties
- animated → bool?
-
Is animated (images only).
no setterinherited
- blurhash → String?
-
Compact representation of a placeholder for an image (images only).
no setterinherited
- contentType → String
-
Content type.
no setterinherited
-
copyWith
→ $UploadCopyWith<
Upload> -
no setterinherited
- created → DateTime
-
Uploaded at.
no setterinherited
- duration → int?
-
Mediafile duration (for audio/video only).
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- mediaType → String
-
?type=file,image,audio,video.
no setterinherited
- name → String
-
Filename.
no setterinherited
- pdfVersion → PdfVersion?
-
PDF version of file. Experimental.
no setterinherited
- preview → UploadPreview?
-
Preview details.
no setterinherited
- processing → bool?
-
File still processing (video only).
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
Upload size in bytes.
no setterinherited
- uid → String
-
Upload id.
no setterinherited
- url → String
-
Absolute url.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited