Upload class
An upload.
If the uploaded file is an image with either width or height > 500 pixels, then a scaled-down preview image is generated. If the uploaded file is an image of which both the height and width are ≤ 500 pixels, then the original file is used as a preview image. If the uploaded file is not an image file, then a thumbnail image is used.
Constructors
-
Upload.fromPayload(Map<
String, dynamic> data) - Creates an upload from a socket message payload.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → num?
-
Height in pixels if the uploaded file is an image or null if it is not.
final
- id → int
-
The upload's unique integer ID.
final
- mimeType → String
-
The MIME
type
of the upload, e.g. "application/pdf" or "image/jpeg".
final
- name → String
-
The name of the file uploaded by the user.
final
- previewHeight → num
-
The height in pixels of the preview image; always ≤ 500.
final
- previewUrl → String
-
URL for downloading the preview image.
final
- previewWidth → num
-
The width in pixels of the preview image; always ≤ 500.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - url → String
-
URL for downloading the uploaded file.
final
- width → num?
-
Width in pixels if the uploaded file is an image or null if it is not.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited