getEventTypeList function

Future<List<EventTypeModel>> getEventTypeList()

Implementation

Future<List<EventTypeModel>> getEventTypeList() async {
  appStore.setLoading(true);
  try {
    var res = EventTypeResponse.fromMap(await (handleResponse(await buildHttpResponse(APIEndPoint.eventTypeList, method: HttpMethod.GET))));
    appStore.setLoading(false);
    return res.data!.data.validate();
  } catch (e) {
    appStore.setLoading(false);
    throw errorSomethingWentWrong;
  }
}