mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
Implemented tab to run setting
This commit is contained in:
@ -1,29 +1,31 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
class ScenesModel {
|
||||
final String id;
|
||||
final String name;
|
||||
final String status;
|
||||
final String type;
|
||||
final String icon;
|
||||
|
||||
ScenesModel({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.status,
|
||||
required this.type,
|
||||
});
|
||||
ScenesModel(
|
||||
{required this.id,
|
||||
required this.name,
|
||||
required this.status,
|
||||
required this.type,
|
||||
required this.icon});
|
||||
|
||||
factory ScenesModel.fromRawJson(String str) =>
|
||||
ScenesModel.fromJson(json.decode(str));
|
||||
factory ScenesModel.fromRawJson(String str) => ScenesModel.fromJson(json.decode(str));
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
Uint8List get iconInBytes => base64Decode(icon);
|
||||
|
||||
factory ScenesModel.fromJson(Map<String, dynamic> json) => ScenesModel(
|
||||
id: json["id"],
|
||||
name: json["name"] ?? '',
|
||||
status: json["status"] ?? '',
|
||||
type: json["type"] ?? '',
|
||||
);
|
||||
id: json["id"],
|
||||
name: json["name"] ?? '',
|
||||
status: json["status"] ?? '',
|
||||
type: json["type"] ?? '',
|
||||
icon: json["icon"] ?? '');
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
|
Reference in New Issue
Block a user