NotificationModel.fromJson constructor

NotificationModel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

NotificationModel.fromJson(Map<String, dynamic> json) {
  unSeenCount = json['unreadCount'];
  pagination = json['pagination'] != null
      ? Pagination.fromJson(json['pagination'])
      : null;
  if (json['data'] != null) {
    esMessage = <EsMessage>[];
    json['data'].forEach((v) {
      esMessage!.add(EsMessage.fromJson(v));
    });
  }
}