mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
PR requested changes
This commit is contained in:
@ -35,8 +35,8 @@ class DeviceStatus {
|
||||
}
|
||||
|
||||
class Status {
|
||||
String code;
|
||||
dynamic value;
|
||||
final String code;
|
||||
final dynamic value;
|
||||
|
||||
Status({
|
||||
required this.code,
|
||||
@ -57,6 +57,16 @@ class Status {
|
||||
};
|
||||
}
|
||||
|
||||
Status copyWith({
|
||||
String? code,
|
||||
dynamic value,
|
||||
}) {
|
||||
return Status(
|
||||
code: code ?? this.code,
|
||||
value: value ?? this.value,
|
||||
);
|
||||
}
|
||||
|
||||
factory Status.fromJson(String source) => Status.fromMap(json.decode(source));
|
||||
|
||||
String toJson() => json.encode(toMap());
|
||||
|
Reference in New Issue
Block a user