ImageContent class

Image content part.

Inheritance

Constructors

ImageContent.fromData({required Uint8List data, required String format, ImageDetail? detail})
create a image content part from binary data.
ImageContent.fromFile({required String path, ImageDetail? detail})
create a image content part from a local file.
ImageContent.fromJson(Map<String, dynamic> json)
Parse a JSON response into an ImageContent object.
ImageContent.fromUrl({ImageDetail? detail, required String? url})
create a image content part for a publicly available image.
const

Properties

data Uint8List?
Binary image data, if provided.
final
detail ImageDetail?
Image detail level for vision models.
final
format String?
File format of the image.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The type identifier of this content part.
no setteroverride
url String?
The publicly available image url, if provided.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert this content part to a JSON map.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited