sendMessage static method
Implementation
static Future<String> sendMessage(String message) async {
try {
final response = await http.get(
Uri.parse('$baseUrl/$message'),
);
if (response.statusCode == 200) {
return response.body;
} else {
throw Exception('فشل في إرسال الرسالة');
}
} catch (e) {
throw Exception('خطأ في الاتصال: $e');
}
}