testConnection method

Future<bool> testConnection()

Implementation

Future<bool> testConnection() async {
  Response response;
  response = await dio.get("/cantons");
  if (response.statusCode == 200 && response.data.toString().isNotEmpty) {
    return true;
  }

  return false;
}