mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00
17 lines
458 B
Dart
17 lines
458 B
Dart
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;
|
|
}
|
|
}
|
|
}
|