mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
connected all apis , create functionality is working
This commit is contained in:
@ -99,34 +99,36 @@ class SceneStaticFunction {
|
||||
|
||||
class SceneOperationalValue {
|
||||
final String icon;
|
||||
final String value;
|
||||
final dynamic value;
|
||||
final String? description;
|
||||
|
||||
SceneOperationalValue({
|
||||
required this.icon,
|
||||
required this.value,
|
||||
this.description,
|
||||
});
|
||||
|
||||
SceneOperationalValue copyWith({
|
||||
String? icon,
|
||||
String? value,
|
||||
dynamic value,
|
||||
String? description,
|
||||
}) {
|
||||
return SceneOperationalValue(
|
||||
icon: icon ?? this.icon,
|
||||
value: value ?? this.value,
|
||||
description: description ?? this.description,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'icon': icon,
|
||||
'value': value,
|
||||
};
|
||||
return {'icon': icon, 'value': value, 'description': description};
|
||||
}
|
||||
|
||||
factory SceneOperationalValue.fromMap(Map<String, dynamic> map) {
|
||||
return SceneOperationalValue(
|
||||
icon: map['icon'] ?? '',
|
||||
value: map['value'] ?? '',
|
||||
value: map['value'],
|
||||
description: map['description'],
|
||||
);
|
||||
}
|
||||
|
||||
@ -137,7 +139,7 @@ class SceneOperationalValue {
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'StaticFunctionOperationHelper(icon: $icon, value: $value)';
|
||||
'StaticFunctionOperationHelper(icon: $icon, value: $value, description: $description)';
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
@ -145,9 +147,10 @@ class SceneOperationalValue {
|
||||
|
||||
return other is SceneOperationalValue &&
|
||||
other.icon == icon &&
|
||||
other.description == description &&
|
||||
other.value == value;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => icon.hashCode ^ value.hashCode;
|
||||
int get hashCode => icon.hashCode ^ value.hashCode ^ description.hashCode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user