fetchTripList method

Future<List<SingleTripResponse>> fetchTripList(
  1. int offset,
  2. int length
)

Implementation

Future<List<SingleTripResponse>> fetchTripList(int offset, int length) async {
  try {
    List<SingleTripResponse> navigationStarted = await kruzr_comm
        .fetchTripList(offset, length);
    return navigationStarted;
  } on Exception catch (e, stackTrace) {
    if (kDebugMode) {
      print("Error in fetchTripList");
      print(stackTrace);
      print(e);
    }
    return Future.error("Unable to fetch trip list");
  }
}