mirror of
https://github.com/SyncrowIOT/web.git
synced 2026-10-25 04:37:56 +00:00
fixes unique id for card drag
This commit is contained in:
@@ -39,24 +39,28 @@ class DeviceDialogHelper {
|
||||
List<DeviceFunction> functions,
|
||||
) async {
|
||||
final routineBloc = context.read<RoutineBloc>();
|
||||
final deviceSelectedFunctions = routineBloc.state.selectedFunctions
|
||||
.where((f) => f.entityId == data['deviceId'])
|
||||
.toList();
|
||||
final deviceSelectedFunctions =
|
||||
routineBloc.state.selectedFunctions[data['uniqueCustomId']] ?? [];
|
||||
|
||||
switch (productType) {
|
||||
case 'AC':
|
||||
return ACHelper.showACFunctionsDialog(
|
||||
context, functions, data['device'], deviceSelectedFunctions);
|
||||
return ACHelper.showACFunctionsDialog(context, functions,
|
||||
data['device'], deviceSelectedFunctions, data['uniqueCustomId']);
|
||||
|
||||
case '1G':
|
||||
return OneGangSwitchHelper.showSwitchFunctionsDialog(
|
||||
context, functions, data['device'], deviceSelectedFunctions);
|
||||
return OneGangSwitchHelper.showSwitchFunctionsDialog(context, functions,
|
||||
data['device'], deviceSelectedFunctions, data['uniqueCustomId']);
|
||||
case '2G':
|
||||
return TwoGangSwitchHelper.showSwitchFunctionsDialog(
|
||||
context, functions);
|
||||
return TwoGangSwitchHelper.showSwitchFunctionsDialog(context, functions,
|
||||
data['device'], deviceSelectedFunctions, data['uniqueCustomId']);
|
||||
case '3G':
|
||||
return ThreeGangSwitchHelper.showSwitchFunctionsDialog(
|
||||
context, functions);
|
||||
context,
|
||||
functions,
|
||||
data['device'],
|
||||
deviceSelectedFunctions,
|
||||
data['uniqueCustomId'],
|
||||
);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user