FilePart class final
A file attachment: an image, document, or audio clip.
Carries either a url (hosted/remote) or inline bytes. Document text extraction is deliberately out of scope here — that is a backend concern, to keep it off the UI thread.
Constructors
Properties
- bytes → Uint8List?
-
The inline contents of the file, if embedded.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- mediaType → String
-
The IANA media type, e.g.
image/pngorapplication/pdf.final - name → String?
-
A human-readable file name, if known.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- url → Uri?
-
The remote location of the file, if hosted.
final
Methods
-
copyWith(
{String? mediaType, Uri? url, Uint8List? bytes, String? name}) → FilePart - Returns a copy with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
Serializes this part, including its
typediscriminator.override -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override