DataPart class final
A data part containing binary data (e.g., images).
- Inheritance
-
- Object
- Part
- StandardPart
- DataPart
- Available extensions
- Annotations
Constructors
Properties
- asUiInteractionPart → UiInteractionPart?
-
Available on StandardPart, provided by the UiPartExtension extension
Returns this part as a UiInteractionPart view.no setter - asUiPart → UiPart?
-
Available on StandardPart, provided by the UiPartExtension extension
Returns this part as a UiPart view, if generic type checks out.no setter - bytes → Uint8List
-
The binary data.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isUiInteractionPart → bool
-
Available on StandardPart, provided by the UiPartExtension extension
Whether this part is a UI interaction part.no setter - isUiPart → bool
-
Available on StandardPart, provided by the UiPartExtension extension
Whether this part is a UI part.no setter - mimeType → String
-
The MIME type of the data.
final
- name → String?
-
Optional name for the data.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
Serializes the part to a JSON map.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
extensionFromMimeType(
String mimeType) → String? - Gets the extension for a MIME type.
-
fromFile(
XFile file) → Future< DataPart> -
Creates a data part from an
XFile. -
mimeTypeForFile(
String path, {Uint8List? headerBytes}) → String - Gets the MIME type for a file.
-
nameFromMimeType(
String mimeType) → String - Gets the name for a MIME type.
Constants
- defaultMimeType → const String
- type → const String