water heater and timer and schedule ui and api ,

Circulate ui and Inching ui
This commit is contained in:
mohammad
2024-09-20 11:50:39 +03:00
parent 26833cf215
commit f0feb4021f
22 changed files with 1830 additions and 15 deletions

View File

@ -32,14 +32,15 @@ class DevicesAPI {
static Future<Map<String, dynamic>> controlDevice(
DeviceControlModel controlModel, String deviceId) async {
try {
final response = await _httpService.post(
path: ApiEndpoints.controlDevice.replaceAll('{deviceUuid}', deviceId),
body: controlModel.toJson(),
showServerMessage: false,
expectedResponseModel: (json) {
print('controlDevice=$json' );
return json;
},
);
return response;
} catch (e) {
@ -75,6 +76,8 @@ class DevicesAPI {
path: ApiEndpoints.deviceFunctionsStatus.replaceAll('{deviceUuid}', deviceId),
showServerMessage: false,
expectedResponseModel: (json) {
print('json===$json');
return json;
},
);
@ -278,17 +281,7 @@ class DevicesAPI {
required String code,
required bool value,
required List<String> days,
}) async {
print( {
"category": category,
"time": time,
"function":{
"code": code,
"value":value,
},
"days": days
});
final response = await _httpService.post(
path: ApiEndpoints.saveSchedule.replaceAll('{deviceUuid}', deviceId),
showServerMessage: false,