readHotels method

Future<List<UHotelResponse>> readHotels(
  1. String query
)

Implementation

Future<List<UHotelResponse>> readHotels(String query) async {
  final List<UHotelResponse> result = <UHotelResponse>[];
  await UServices.hotel.readHotels(
    p: UHotelReadParams(title: query, pageSize: 100, pageNumber: 1),
    onOk: (UResponse<List<UHotelResponse>> r) => result.addAll(r.result ?? <UHotelResponse>[]),
    onError: (UEmptyResponse e) {},
    onException: (String e) {},
  );
  return result;
}