AIAttachment class
An attachment that can be sent with a message.
Constructors
-
AIAttachment({required AIAttachmentType type, List<
int> ? bytes, String? url, String? filePath, String? mimeType, String? name}) -
AIAttachment.fromJson(Map<
String, dynamic> json) -
factory
-
AIAttachment.imageBytes(List<
int> bytes, {String? mimeType}) -
Creates an image attachment from bytes.
factory
- AIAttachment.imageUrl(String url)
-
Creates an image attachment from a URL.
factory
Properties
-
bytes
→ List<
int> ? -
Raw bytes of the attachment (for in-memory data).
final
- filePath → String?
-
File path (for local files).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- mimeType → String?
-
MIME type of the attachment.
final
- name → String?
-
Display name for the attachment.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → AIAttachmentType
-
The type of this attachment.
final
- url → String?
-
URL of the attachment (for remote resources).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited