ChatModel class

Represents a chat model that contains information about a chat message.

Constructors

ChatModel({required int chat, required String message, required dynamic time, dynamic chatType = ChatType.message})
Creates a new instance of the ChatModel class.
ChatModel.fromJson(dynamic json)
Creates a new instance of the ChatModel class from a JSON object.
factory

Properties

chat int
The chat ID.
final
chatType ↔ dynamic
The type of chat.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
message String
The chat message.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
time → dynamic
The time of the chat.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the ChatModel instance to a JSON object.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

toJsonList(List<ChatModel> list) List<Map<String, dynamic>>
Converts a list of ChatModel instances to a list of JSON objects.