InboxNotification constructor

InboxNotification(
  1. Map? map
)

Constructor fo InboxNotification

Param with Map

Implementation

InboxNotification(Map? map) {
  map?.forEach((key, value) {
    if (key == MAP_ID) id = value.toString();
    if (key == MAP_SENT_AT) sentAt = value.toString();
    if (key == MAP_STATUS) status = value.toString();
    if (key == MAP_SENDING_ID) sendingId = value.toString();
    if (key == MAP_MESSAGE) {
      if (Platform.isAndroid) {
        message = new Push(new Map<String, String>.from(json.decode(value)));
      } else {
        //message = new Push(new Map<String, dynamic>.from(value));
      }
    }
    if (key == MAP_CATEGORY) category = new InboxCategory(value);
    if (key == MAP_READ) read = value.toString() == "true";
  });
}