Каркас приложения: авторизация, зоны/устройства/правила, управление устройствами

HTTP-клиент к /api/v1 с Sanctum-токеном (хранится в secure storage),
модели зеркалят Laravel API Resources. Экраны: логин, список устройств
с живым статусом, детальная страница устройства (история телеметрии,
turn-on/turn-off/set-level с проверкой capability), списки зон и правил
автоматизации (пока только чтение — формы создания/редактирования впереди).
This commit is contained in:
2026-08-12 01:12:39 +05:00
parent 6a00826194
commit 45b8733d22
25 changed files with 1531 additions and 129 deletions
+15
View File
@@ -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?,
);
}