getNotificationListApi function

Future<NotificationResponseData?> getNotificationListApi()

Implementation

Future<NotificationResponseData?> getNotificationListApi() async {
  appStore.setLoading(true);

  Map req = {UserKeys.userId: appStore.userId};
  try {
    var res = NotificationResponse.fromMap(await (handleResponse(await buildHttpResponse(APIEndPoint.notificationList, request: req, method: HttpMethod.POST))));
    appStore.setLoading(false);
    return res.data;
  } catch (e) {
    appStore.setLoading(false);
    throw errorSomethingWentWrong;
  }
}