ConversationsModel.fromMap constructor

ConversationsModel.fromMap(
  1. Map<String, dynamic> json
)

Implementation

ConversationsModel.fromMap(Map<String, dynamic> json) {
  id = json['id'];
  email = json['email'];
  username = json['username'];
  imageUrl = json['imageUrl'];
  if (json['chats'] != null) {
    chats = <Chats>[];
    json['chats'].forEach((v) {
      chats?.add(Chats.fromJson(v));
    });
  }
  platform = json['platform'];
}