finished adding tasks and removing them , added error handling

This commit is contained in:
ashrafzarkanisala
2024-06-26 20:32:34 +03:00
parent ae47e48832
commit 9fe25b9bd3
22 changed files with 605 additions and 231 deletions

View File

@ -0,0 +1,16 @@
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
import 'package:syncrow_app/services/api/devices_api.dart';
class SceneRepo {
Future<bool> deviceControl({
required DeviceControlModel controlModel,
required String deviceId,
}) async {
final response = await DevicesAPI.controlDevice(controlModel, deviceId);
if (response['success'] == true) {
return true;
} else {
return false;
}
}
}