getNotificationList method

dynamic getNotificationList()

Implementation

getNotificationList() async {
  var decodedResponse;
  try {
    http.Response response = await http
        .get(Uri.parse('${BASE_URL}notification_api/get_all_list'), headers: {
      "Authorization": currentUserToken,
    });

    decodedResponse = json.decode(response.body);
    allNotificationsList = decodedResponse['all_notification'];
    orderUpdateslist = decodedResponse['order_notification'];
  } catch (e) {
    ErrorListner(
        apiname: 'notification_api/get_all_list',
        responsed: "${decodedResponse}",
        request: '',
        app_error: '${e}');
  }
}