mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
connected rest of the devices and functions and trigger api
This commit is contained in:
@ -101,27 +101,36 @@ class SceneOperationalValue {
|
||||
final String icon;
|
||||
final dynamic value;
|
||||
final String? description;
|
||||
final String? iconValue;
|
||||
|
||||
SceneOperationalValue({
|
||||
required this.icon,
|
||||
required this.value,
|
||||
this.description,
|
||||
this.iconValue,
|
||||
});
|
||||
|
||||
SceneOperationalValue copyWith({
|
||||
String? icon,
|
||||
dynamic value,
|
||||
String? description,
|
||||
String? iconValue,
|
||||
}) {
|
||||
return SceneOperationalValue(
|
||||
icon: icon ?? this.icon,
|
||||
value: value ?? this.value,
|
||||
description: description ?? this.description,
|
||||
iconValue: iconValue ?? this.iconValue,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {'icon': icon, 'value': value, 'description': description};
|
||||
return {
|
||||
'icon': icon,
|
||||
'value': value,
|
||||
'description': description,
|
||||
'iconValue': iconValue
|
||||
};
|
||||
}
|
||||
|
||||
factory SceneOperationalValue.fromMap(Map<String, dynamic> map) {
|
||||
@ -129,6 +138,7 @@ class SceneOperationalValue {
|
||||
icon: map['icon'] ?? '',
|
||||
value: map['value'],
|
||||
description: map['description'],
|
||||
iconValue: map['iconValue'] ?? '',
|
||||
);
|
||||
}
|
||||
|
||||
@ -139,7 +149,7 @@ class SceneOperationalValue {
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'StaticFunctionOperationHelper(icon: $icon, value: $value, description: $description)';
|
||||
'StaticFunctionOperationHelper(icon: $icon, value: $value, description: $description, iconValue: $iconValue)';
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
@ -148,9 +158,15 @@ class SceneOperationalValue {
|
||||
return other is SceneOperationalValue &&
|
||||
other.icon == icon &&
|
||||
other.description == description &&
|
||||
other.iconValue == iconValue &&
|
||||
other.value == value;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => icon.hashCode ^ value.hashCode ^ description.hashCode;
|
||||
int get hashCode =>
|
||||
icon.hashCode ^
|
||||
value.hashCode ^
|
||||
description.hashCode ^
|
||||
iconValue.hashCode ^
|
||||
description.hashCode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user