Added latest changes and solved the conflicts

This commit is contained in:
Abdullah Alassaf
2024-06-26 22:46:29 +03:00
13 changed files with 151 additions and 67 deletions

View File

@ -9,6 +9,24 @@ import 'package:syncrow_app/services/api/http_service.dart';
class DevicesAPI {
static final HTTPService _httpService = HTTPService();
static Future<Map<String, dynamic>> firmwareDevice(
{required String deviceId, required String firmwareVersion}) async {
try {
final response = await _httpService.post(
path: ApiEndpoints.firmwareDevice
.replaceAll('{deviceUuid}', deviceId)
.replaceAll('{firmwareVersion}', firmwareVersion),
showServerMessage: false,
expectedResponseModel: (json) {
return json;
},
);
return response;
} catch (e) {
rethrow;
}
}
static Future<Map<String, dynamic>> controlDevice(
DeviceControlModel controlModel, String deviceId) async {
try {