mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-15 17:47:53 +00:00
added routines details apis
This commit is contained in:
@ -24,7 +24,14 @@ class ScenesModel {
|
||||
|
||||
String toRawJson() => json.encode(toJson());
|
||||
|
||||
Uint8List get iconInBytes => base64Decode(icon ?? '');
|
||||
Uint8List? get iconInBytes {
|
||||
if (icon == null || icon?.isEmpty == true) return null;
|
||||
try {
|
||||
return base64Decode(icon!);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
factory ScenesModel.fromJson(Map<String, dynamic> json,
|
||||
{bool? isAutomation}) {
|
||||
|
Reference in New Issue
Block a user