Inbox constructor

Inbox(
  1. Map map
)

Constructor of Inbox

param Map

Implementation

Inbox(Map map) {
  map.forEach((key, value) {
    switch (key) {
      case LAST_ACCESS:
        lastAccess = value.toString();
        break;
      case NOTIFICATIONS:
        String notificationsString = value.toString();
        notifications = InboxNotification.createArray(notificationsString);
        break;
      case COUNT:
        count = int.parse(value.toString());
        break;
      case PAGESIZE:
        pageSize = int.parse(value.toString());
        break;
      case PAGE:
        page = int.parse(value.toString());
        break;
    }
  });
}