mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00
51 lines
1.2 KiB
Dart
51 lines
1.2 KiB
Dart
import 'package:syncrow_app/features/devices/model/function_model.dart';
|
|
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
|
|
|
mixin SceneHelper {
|
|
get lightBulbFunctions => null;
|
|
|
|
get wallSensorFunctions => null;
|
|
|
|
get acFunctions => null;
|
|
|
|
get doorLockFunctions => null;
|
|
|
|
get curtainFunctions => null;
|
|
|
|
get threeGangFunctions => null;
|
|
|
|
get gatewayFunctions => null;
|
|
|
|
getFunctionsWithIcons(
|
|
{DeviceType? type, required List<FunctionModel> functions}) {
|
|
switch (type) {
|
|
case DeviceType.LightBulb:
|
|
return lightBulbFunctions;
|
|
case DeviceType.CeilingSensor:
|
|
return ceilingSensorFunctions(functions);
|
|
case DeviceType.WallSensor:
|
|
return wallSensorFunctions;
|
|
case DeviceType.AC:
|
|
return acFunctions;
|
|
case DeviceType.DoorLock:
|
|
return doorLockFunctions;
|
|
case DeviceType.Curtain:
|
|
return curtainFunctions;
|
|
case DeviceType.ThreeGang:
|
|
return threeGangFunctions;
|
|
case DeviceType.Gateway:
|
|
return gatewayFunctions;
|
|
default:
|
|
return lightBulbFunctions;
|
|
}
|
|
}
|
|
|
|
ceilingSensorFunctions(List<FunctionModel> functions) {
|
|
List<FunctionModel> temp = [];
|
|
for (var item in functions) {
|
|
|
|
}
|
|
return temp;
|
|
}
|
|
}
|