Chats.fromMap constructor

Chats.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Chats.fromMap(Map<String, dynamic> map) {
  return Chats(
    date: map['date'] != null
        ? DateTime.fromMillisecondsSinceEpoch(map['date'])
        : null,
    message: map['message'],
    read: map['read'],
    owner: map['owner'],
  );
}