mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 22:34:55 +00:00
fixes unique id for card drag
This commit is contained in:
@ -1,29 +1,30 @@
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||
// import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||
|
||||
class RoutineItem {
|
||||
final AllDevicesModel device;
|
||||
final String? function;
|
||||
final dynamic value;
|
||||
// class RoutineItem {
|
||||
// final AllDevicesModel device;
|
||||
// final String? function;
|
||||
// final dynamic value;
|
||||
|
||||
RoutineItem({
|
||||
required this.device,
|
||||
this.function,
|
||||
this.value,
|
||||
});
|
||||
// RoutineItem({
|
||||
// required this.device,
|
||||
// this.function,
|
||||
// this.value,
|
||||
// });
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'device': device,
|
||||
'function': function,
|
||||
'value': value,
|
||||
};
|
||||
}
|
||||
// Map<String, dynamic> toMap() {
|
||||
// return {
|
||||
// 'device': device,
|
||||
// 'function': function,
|
||||
// 'value': value,
|
||||
// };
|
||||
// }
|
||||
|
||||
factory RoutineItem.fromMap(Map<String, dynamic> map) {
|
||||
return RoutineItem(
|
||||
device: map['device'] as AllDevicesModel,
|
||||
function: map['function'],
|
||||
value: map['value'],
|
||||
);
|
||||
}
|
||||
}
|
||||
// factory RoutineItem.fromMap(Map<String, dynamic> map) {
|
||||
// return RoutineItem(
|
||||
// device: map['device'] as AllDevicesModel,
|
||||
// function: map['function'],
|
||||
// value: map['value'],
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// : uniqueCustomId = uniqueCustomId ?? const Uuid().v4()
|
||||
|
||||
Reference in New Issue
Block a user