ChatModel.fromJson constructor
ChatModel.fromJson(
- dynamic json
Creates a new instance of the ChatModel class from a JSON object.
The json parameter represents the JSON object containing the chat data.
Implementation
factory ChatModel.fromJson(dynamic json) {
return ChatModel(
chat: json['chat'] as int,
message: json['message'] as String,
time: json['time'] as dynamic,
);
}