getAppointmentsBetweenDates method

Future<List<AppointmentModel>> getAppointmentsBetweenDates(
  1. DateTime from,
  2. DateTime to, {
  3. Object? authorization,
})

Parameters:

Implementation

Future<List<AppointmentModel>> getAppointmentsBetweenDates(
  DateTime from,
  DateTime to, {
  Object? authorization,
}) async {
  final response = await getAppointmentsBetweenDatesWithHttpInfo(
    from,
    to,
    authorization: authorization,
  );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }

  final responseBody = await _decodeBodyBytes(response);
  return (await apiClient.deserializeAsync(
          responseBody, 'List<AppointmentModel>') as List)
      .cast<AppointmentModel>()
      .toList(growable: false);
}