getTicketViewResponse function

Future<BookingDetailModelResponse?> getTicketViewResponse(
  1. {int? businessId,
  2. String? ticketCode}
)

Implementation

Future<BookingDetailModelResponse?> getTicketViewResponse({int? businessId, String? ticketCode}) async {
  String scanCode = "?ticket_code=$ticketCode";
  String id = "&business_id=$businessId";
  appStore.setLoading(true);
   try {
  var res = BookingDetailModelResponse.fromMap(await (handleResponse(await buildHttpResponse("${APIEndPoint.viewTicket}$scanCode$id", method: HttpMethod.GET))));

  appStore.setLoading(false);
  return res;
  } catch (e) {
    appStore.setLoading(false);
    throw errorSomethingWentWrong;
  }
}