fromMap static method

ChatNotification fromMap(
  1. Map data
)

Converts map to object.

Implementation

static ChatNotification fromMap(Map data) {
  String id = data['id'] ?? '';
  String userId = data['userId'] ?? '';
  String title = data['title'] ?? '';
  String message = data['message'] ?? '';

  return ChatNotification(id, userId, title, message);
}