testConnection method
Test API connection
Implementation
Future<bool> testConnection() async {
try {
final url = Uri.parse('$baseUrl/health');
final response = await http.get(url);
return response.statusCode == 200;
} catch (e) {
return false;
}
}