getAvailableDrivers method

dynamic getAvailableDrivers()

Implementation

getAvailableDrivers() async {
  availableDriverList = [];
  try {
    Response response =
        await GlideGoRF.GetAvailableDrivers(CoordinateRF(0, 0), 100);
    AvailableDriversResponse availableDrivers =
        AvailableDriversResponse.fromJson(json.decode(response.body));

    availableDriverList = availableDrivers.apiPacket.packetList;

    updateDriverList("bike");
    getDistance();
  } catch (e) {
    debugPrint(e.toString());
  }
}