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