mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-17 02:25:16 +00:00
finished get scene details
This commit is contained in:
@ -11,6 +11,8 @@ class SceneStaticFunction {
|
||||
final String deviceId;
|
||||
final String operationName;
|
||||
final String uniqueCustomId;
|
||||
final dynamic functionValue;
|
||||
final String? deviceIcon;
|
||||
|
||||
SceneStaticFunction({
|
||||
required this.icon,
|
||||
@ -19,6 +21,8 @@ class SceneStaticFunction {
|
||||
required this.operationalValues,
|
||||
required this.deviceId,
|
||||
required this.operationName,
|
||||
required this.functionValue,
|
||||
this.deviceIcon,
|
||||
}) : uniqueCustomId = const Uuid().v4();
|
||||
|
||||
SceneStaticFunction copyWith({
|
||||
@ -28,6 +32,8 @@ class SceneStaticFunction {
|
||||
List<SceneOperationalValue>? operationalValues,
|
||||
String? deviceId,
|
||||
String? operationName,
|
||||
dynamic functionValue,
|
||||
String? deviceIcon,
|
||||
}) {
|
||||
return SceneStaticFunction(
|
||||
icon: icon ?? this.icon,
|
||||
@ -36,6 +42,8 @@ class SceneStaticFunction {
|
||||
operationalValues: operationalValues ?? this.operationalValues,
|
||||
deviceId: deviceId ?? this.deviceId,
|
||||
operationName: operationName ?? this.operationName,
|
||||
functionValue: functionValue ?? this.functionValue,
|
||||
deviceIcon: deviceIcon ?? this.deviceIcon,
|
||||
);
|
||||
}
|
||||
|
||||
@ -46,7 +54,9 @@ class SceneStaticFunction {
|
||||
'code': code,
|
||||
'operationalValues': operationalValues.map((x) => x.toMap()).toList(),
|
||||
'deviceId': deviceId,
|
||||
'operationName': operationName
|
||||
'operationName': operationName,
|
||||
'functionValue': functionValue,
|
||||
'deviceIcon': deviceIcon
|
||||
};
|
||||
}
|
||||
|
||||
@ -60,6 +70,8 @@ class SceneStaticFunction {
|
||||
),
|
||||
deviceId: map['deviceId'] ?? '',
|
||||
operationName: map['operationName'] ?? '',
|
||||
functionValue: map['functionValue'] ?? '',
|
||||
deviceIcon: map['deviceIcon'] ?? '',
|
||||
);
|
||||
}
|
||||
|
||||
@ -70,7 +82,7 @@ class SceneStaticFunction {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SceneStaticFunction(icon: $icon, name: $deviceName, code: $code, operationalValues: $operationalValues, deviceId: $deviceId, operationName: $operationName)';
|
||||
return 'SceneStaticFunction(icon: $icon, name: $deviceName, code: $code, operationalValues: $operationalValues, deviceId: $deviceId, operationName: $operationName, functionValue: $functionValue, deviceIcon: $deviceIcon)';
|
||||
}
|
||||
|
||||
@override
|
||||
@ -82,6 +94,8 @@ class SceneStaticFunction {
|
||||
other.deviceName == deviceName &&
|
||||
other.code == code &&
|
||||
other.operationName == operationName &&
|
||||
other.functionValue == functionValue &&
|
||||
other.deviceIcon == deviceIcon &&
|
||||
listEquals(other.operationalValues, operationalValues) &&
|
||||
other.deviceId == deviceId;
|
||||
}
|
||||
@ -93,6 +107,8 @@ class SceneStaticFunction {
|
||||
code.hashCode ^
|
||||
deviceId.hashCode ^
|
||||
operationName.hashCode ^
|
||||
functionValue.hashCode ^
|
||||
deviceIcon.hashCode ^
|
||||
operationalValues.hashCode;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user