ChatkitThread class
A ChatKit thread.
Represents a conversation thread in the ChatKit API.
Example
final threads = await client.chatkit.threads.list();
for (final thread in threads.data) {
print('${thread.title ?? thread.id}: ${thread.status.type}');
}
- Annotations
-
- @immutable
Constructors
- ChatkitThread({required String id, required String object, required int createdAt, String? title, required ChatkitThreadStatus status, required String user})
-
Creates a ChatkitThread.
const
-
ChatkitThread.fromJson(Map<
String, dynamic> json) -
Creates a ChatkitThread from JSON.
factory
Properties
- createdAt → int
-
Unix timestamp (in seconds) for when the thread was created.
final
- createdAtDateTime → DateTime
-
The creation time as a DateTime.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Identifier of the thread.
final
- object → String
-
Type discriminator that is always
chatkit.thread.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → ChatkitThreadStatus
-
Current status for the thread.
final
- title → String?
-
Optional human-readable title for the thread.
final
- user → String
-
Free-form string that identifies the end user who owns the thread.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override