Merge branch 'dev' of https://github.com/SyncrowIOT/web into SP-1703-fe-build-device-overview-page_curtain_module

This commit is contained in:
Rafeek-Khoudare
2025-06-27 16:55:35 +03:00
144 changed files with 6301 additions and 2161 deletions

View File

@ -1,3 +1,4 @@
import 'dart:convert';
import 'dart:core';
import 'package:flutter/material.dart';
import 'package:syncrow_web/pages/device_managment/all_devices/models/device_reports.dart';
@ -386,4 +387,34 @@ class DevicesManagementApi {
);
return response;
}
Future<bool> postSchedule({
required String category,
required String deviceId,
required String time,
required String code,
required bool value,
required List<String> days,
}) async {
final response = await HTTPService().post(
path: ApiEndpoints.saveSchedule.replaceAll('{deviceUuid}', deviceId),
showServerMessage: false,
body: jsonEncode(
{
'category': category,
'time': time,
'function': {
'code': code,
'value': value,
},
'days': days
},
),
expectedResponseModel: (json) {
return json['success'] ?? false;
},
);
return response;
}
}