DataContent class
Represents binary data content, such as an image or audio.
Constructors
- DataContent(Uint8List? data, {required String? mediaType, String? name})
- Creates a DataContent from raw bytes and a media type.
- DataContent.fromUri(String uri, {String? name})
- Creates a DataContent from a data URI string.
Properties
- additionalProperties ↔ AdditionalPropertiesDictionary?
-
Additional properties.
getter/setter pairinherited
- data → Uint8List?
-
The raw byte data, if available.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- mediaType → String?
-
The MIME type of the data (e.g. "image/png").
final
- name ↔ String?
-
An optional name or identifier for the data.
getter/setter pair
- rawRepresentation ↔ Object?
-
The underlying implementation-specific representation of this content.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uri → String?
-
The URI representation (data URI or original URI).
no setter
Methods
-
hasTopLevelMediaType(
String topLevelType) → bool -
Returns
trueif the mediaType has the given top-level type. -
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