mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
Refactor device name display in RoomPageSwitch widget
This commit is contained in:
@ -74,7 +74,7 @@ class Action {
|
||||
ExecutorProperty? executorProperty;
|
||||
String? name;
|
||||
String? type;
|
||||
String? productType;
|
||||
final String productType;
|
||||
|
||||
Action({
|
||||
required this.actionExecutor,
|
||||
@ -82,7 +82,7 @@ class Action {
|
||||
this.executorProperty,
|
||||
this.name,
|
||||
this.type,
|
||||
this.productType,
|
||||
required this.productType,
|
||||
});
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
@ -94,7 +94,7 @@ class Action {
|
||||
entityId: json["entityId"] as String,
|
||||
name: json['name'] as String?,
|
||||
type: json['type'] as String?,
|
||||
productType: json['productType'] as String?,
|
||||
productType: json['productType'] as String,
|
||||
);
|
||||
}
|
||||
if (json["executorProperty"] == null) {
|
||||
@ -105,7 +105,7 @@ class Action {
|
||||
actionExecutor: json["actionExecutor"] as String,
|
||||
entityId: json["entityId"] as String,
|
||||
executorProperty: ExecutorProperty.fromJson(json["executorProperty"]),
|
||||
productType: json['productType'] as String?,
|
||||
productType: json['productType'] as String,
|
||||
);
|
||||
}
|
||||
|
||||
@ -146,12 +146,14 @@ class Condition {
|
||||
final String entityId;
|
||||
final String entityType;
|
||||
final Expr expr;
|
||||
final String productType;
|
||||
|
||||
Condition({
|
||||
required this.code,
|
||||
required this.entityId,
|
||||
required this.entityType,
|
||||
required this.expr,
|
||||
required this.productType,
|
||||
});
|
||||
|
||||
factory Condition.fromRawJson(String str) =>
|
||||
@ -164,6 +166,7 @@ class Condition {
|
||||
entityId: json["entityId"],
|
||||
entityType: json["entityType"],
|
||||
expr: Expr.fromJson(json["expr"]),
|
||||
productType: json['productType'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
|
Reference in New Issue
Block a user