Каркас приложения: авторизация, зоны/устройства/правила, управление устройствами
HTTP-клиент к /api/v1 с Sanctum-токеном (хранится в secure storage), модели зеркалят Laravel API Resources. Экраны: логин, список устройств с живым статусом, детальная страница устройства (история телеметрии, turn-on/turn-off/set-level с проверкой capability), списки зон и правил автоматизации (пока только чтение — формы создания/редактирования впереди).
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
class Zone {
|
||||
Zone({required this.id, required this.name, this.description, this.devicesCount});
|
||||
|
||||
final int id;
|
||||
final String name;
|
||||
final String? description;
|
||||
final int? devicesCount;
|
||||
|
||||
factory Zone.fromJson(Map<String, dynamic> json) => Zone(
|
||||
id: json['id'] as int,
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String?,
|
||||
devicesCount: json['devices_count'] as int?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user