mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-17 02:25:16 +00:00
push fixes
This commit is contained in:
@ -11,7 +11,7 @@ class SceneStaticFunction {
|
||||
final List<SceneOperationalValue> operationalValues;
|
||||
final String deviceId;
|
||||
final String operationName;
|
||||
final String uniqueCustomId;
|
||||
final String? uniqueCustomId;
|
||||
final dynamic functionValue;
|
||||
final String? deviceIcon;
|
||||
final OperationDialogType operationDialogType;
|
||||
@ -28,7 +28,8 @@ class SceneStaticFunction {
|
||||
this.deviceIcon,
|
||||
required this.operationDialogType,
|
||||
this.comparator,
|
||||
}) : uniqueCustomId = const Uuid().v4();
|
||||
String? uniqueCustomId,
|
||||
}) : uniqueCustomId = uniqueCustomId ?? const Uuid().v4();
|
||||
|
||||
SceneStaticFunction copyWith({
|
||||
String? icon,
|
||||
@ -42,6 +43,7 @@ class SceneStaticFunction {
|
||||
String? deviceName,
|
||||
OperationDialogType? operationDialogType,
|
||||
String? comparator,
|
||||
String? uniqueCustomId,
|
||||
}) {
|
||||
return SceneStaticFunction(
|
||||
icon: icon ?? this.icon,
|
||||
@ -54,6 +56,7 @@ class SceneStaticFunction {
|
||||
deviceIcon: deviceIcon ?? this.deviceIcon,
|
||||
operationDialogType: operationDialogType ?? this.operationDialogType,
|
||||
comparator: comparator ?? this.comparator,
|
||||
uniqueCustomId: uniqueCustomId ?? const Uuid().v4(),
|
||||
);
|
||||
}
|
||||
|
||||
@ -68,7 +71,8 @@ class SceneStaticFunction {
|
||||
'functionValue': functionValue,
|
||||
'deviceIcon': deviceIcon,
|
||||
'operationDialogType': operationDialogType.name,
|
||||
'comparator': comparator
|
||||
'comparator': comparator,
|
||||
'uniqueCustomId': uniqueCustomId,
|
||||
};
|
||||
}
|
||||
|
||||
@ -88,6 +92,7 @@ class SceneStaticFunction {
|
||||
? OperationDialogType.values.byName(map['operationDialogType'])
|
||||
: OperationDialogType.none,
|
||||
comparator: map['comparator'],
|
||||
uniqueCustomId: map['uniqueCustomId'] ?? const Uuid().v4(),
|
||||
);
|
||||
}
|
||||
|
||||
@ -98,7 +103,7 @@ class SceneStaticFunction {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SceneStaticFunction(icon: $icon, name: $deviceName, code: $code, operationalValues: $operationalValues, deviceId: $deviceId, operationName: $operationName, functionValue: $functionValue, deviceIcon: $deviceIcon, operationDialogType: $operationDialogType, comparator: $comparator)';
|
||||
return 'SceneStaticFunction(icon: $icon, name: $deviceName, code: $code, operationalValues: $operationalValues, deviceId: $deviceId, operationName: $operationName, functionValue: $functionValue, deviceIcon: $deviceIcon, operationDialogType: $operationDialogType, comparator: $comparator, uniqueCustomId: $uniqueCustomId)';
|
||||
}
|
||||
|
||||
@override
|
||||
@ -113,6 +118,7 @@ class SceneStaticFunction {
|
||||
other.functionValue == functionValue &&
|
||||
other.deviceIcon == deviceIcon &&
|
||||
other.comparator == comparator &&
|
||||
other.uniqueCustomId == uniqueCustomId &&
|
||||
other.operationDialogType == operationDialogType &&
|
||||
listEquals(other.operationalValues, operationalValues) &&
|
||||
other.deviceId == deviceId;
|
||||
@ -128,6 +134,7 @@ class SceneStaticFunction {
|
||||
functionValue.hashCode ^
|
||||
deviceIcon.hashCode ^
|
||||
comparator.hashCode ^
|
||||
uniqueCustomId.hashCode ^
|
||||
operationDialogType.hashCode ^
|
||||
operationalValues.hashCode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user