getTripList method
Implementation
Future<List<SingleTripResponse>> getTripList(int offset, int length) async {
try {
List<SingleTripResponse> navigationStarted = await kruzr_comm
.getTripList(offset, length);
return navigationStarted;
} on PlatformException catch (e, stackTrace) {
if (kDebugMode) {
print("Error in getTripList");
print(stackTrace);
print(e);
}
return Future.error({"code": e.code, "message": e.message, "details": e.details});
} on Exception catch (e, stackTrace) {
if (kDebugMode) {
print("Error in getTripList");
print(stackTrace);
print(e);
}
return Future.error(PlatformException(code: "PLUGIN_ERROR", message: e.toString()));
}
}