mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
push water leak device
This commit is contained in:
17
assets/icons/automation_records.svg
Normal file
17
assets/icons/automation_records.svg
Normal file
@ -0,0 +1,17 @@
|
||||
<svg width="35" height="36" viewBox="0 0 35 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M26.7648 0H11.3236C9.61799 0 8.23535 1.38264 8.23535 3.08824V32.049C8.23535 33.7546 9.61799 35.1373 11.3236 35.1373H31.9118C33.6174 35.1373 35.0001 33.7546 35.0001 32.049V8.23529L26.7648 0Z" fill="#E4F2F9"/>
|
||||
<path d="M26.7642 0H21.6172V35.1373H31.9113C33.6169 35.1373 34.9995 33.7546 34.9995 32.049V8.23529L26.7642 0Z" fill="#BDE0F1"/>
|
||||
<path d="M26.7646 0V7.20588C26.7646 7.77439 27.2256 8.23529 27.7941 8.23529H34.9999L26.7646 0Z" fill="#77BEE2"/>
|
||||
<path d="M29.1675 20.7258H14.0695C13.5009 20.7258 13.04 20.2649 13.04 19.6964C13.04 19.1279 13.5009 18.667 14.0695 18.667H29.1675C29.736 18.667 30.1969 19.1279 30.1969 19.6964C30.1969 20.2649 29.736 20.7258 29.1675 20.7258Z" fill="#5F5F82"/>
|
||||
<path d="M29.1675 14.5491H14.0695C13.5009 14.5491 13.04 14.0882 13.04 13.5196C13.04 12.9511 13.5009 12.4902 14.0695 12.4902H29.1675C29.736 12.4902 30.1969 12.9511 30.1969 13.5196C30.1969 14.0882 29.736 14.5491 29.1675 14.5491Z" fill="#5F5F82"/>
|
||||
<path d="M29.1675 26.9026H14.0695C13.5009 26.9026 13.04 26.4417 13.04 25.8732C13.04 25.3047 13.5009 24.8438 14.0695 24.8438H29.1675C29.736 24.8438 30.1969 25.3047 30.1969 25.8732C30.1969 26.4417 29.736 26.9026 29.1675 26.9026Z" fill="#5F5F82"/>
|
||||
<path d="M30.1956 19.6954C30.1956 19.1269 29.7347 18.666 29.1662 18.666H21.6172V20.7248H29.1662C29.7347 20.7248 30.1956 20.2639 30.1956 19.6954Z" fill="#3C3C55"/>
|
||||
<path d="M30.1956 13.5196C30.1956 12.9511 29.7347 12.4902 29.1662 12.4902H21.6172V14.5491H29.1662C29.7347 14.5491 30.1956 14.0882 30.1956 13.5196Z" fill="#3C3C55"/>
|
||||
<path d="M29.1662 26.9016C29.7347 26.9016 30.1956 26.4407 30.1956 25.8722C30.1956 25.3037 29.7347 24.8428 29.1662 24.8428H21.6172V26.9016H29.1662Z" fill="#3C3C55"/>
|
||||
<path d="M9.26471 35.1368C4.15615 35.1368 0 30.9807 0 25.8721C0 20.7636 4.15615 16.6074 9.26471 16.6074C14.3733 16.6074 18.5294 20.7636 18.5294 25.8721C18.5294 30.9807 14.3733 35.1368 9.26471 35.1368Z" fill="#FF7350"/>
|
||||
<path d="M9.26465 16.6074V35.1368C14.3732 35.1368 18.5294 30.9807 18.5294 25.8721C18.5294 20.7636 14.3732 16.6074 9.26465 16.6074Z" fill="#FF4B20"/>
|
||||
<path d="M9.26448 18.666C5.29115 18.666 2.05859 21.8986 2.05859 25.8719C2.05859 29.8452 5.29115 33.0778 9.26448 33.0778C13.2378 33.0778 16.4704 29.8452 16.4704 25.8719C16.4704 21.8986 13.2378 18.666 9.26448 18.666Z" fill="#E4F2F9"/>
|
||||
<path d="M9.26465 18.666V33.0778C13.238 33.0778 16.4705 29.8452 16.4705 25.8719C16.4705 21.8986 13.238 18.666 9.26465 18.666Z" fill="#BDE0F1"/>
|
||||
<path d="M12.0099 24.8432H10.2942V21.755C10.2942 21.1865 9.83327 20.7256 9.26476 20.7256C8.69625 20.7256 8.23535 21.1865 8.23535 21.755V25.8726C8.23535 26.4412 8.69625 26.9021 9.26476 26.9021H12.0099C12.5784 26.9021 13.0393 26.4412 13.0393 25.8726C13.0393 25.3041 12.5784 24.8432 12.0099 24.8432Z" fill="#5F5F82"/>
|
||||
<path d="M12.0097 24.8432H10.2941V21.755C10.2941 21.1865 9.83316 20.7256 9.26465 20.7256V26.9021H12.0097C12.5783 26.9021 13.0392 26.4412 13.0392 25.8726C13.0392 25.3041 12.5783 24.8432 12.0097 24.8432Z" fill="#3C3C55"/>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
11
assets/icons/water_leak_detected.svg
Normal file
11
assets/icons/water_leak_detected.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<svg width="33" height="38" viewBox="0 0 33 38" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M29.788 23.1188C29.788 31.3375 23.1198 38 14.894 38C6.66832 38 0 31.3375 0 23.1188C0 15.8539 11.6379 3.1015 14.3389 0.239633C14.6404 -0.0798778 15.1477 -0.0798778 15.4492 0.239633C18.1502 3.10158 29.788 15.8539 29.788 23.1188Z" fill="#B3DAFE"/>
|
||||
<path d="M15.4491 0.239633C15.1476 -0.0798778 14.6403 -0.0798778 14.3388 0.239633C14.1736 0.414715 13.9745 0.627277 13.7471 0.872793C17.2371 4.64154 27.4942 16.2982 27.4942 23.1187C27.4942 30.9518 21.4369 37.3714 13.7471 37.9564C14.1256 37.9852 14.508 37.9999 14.894 37.9999C23.1197 37.9999 29.788 31.3374 29.788 23.1187C29.788 15.8539 18.1502 3.10158 15.4491 0.239633Z" fill="#8AC9FE"/>
|
||||
<path d="M29.7489 24.1975C25.598 22.4389 21.0994 22.7823 9.48614 25.2106C6.87119 25.7574 3.87944 26.4133 0.56543 27.1942C2.33903 33.4317 8.08252 38.0002 14.8941 38.0002C22.7568 38.0002 29.1958 31.9126 29.7489 24.1975Z" fill="#60B7FF"/>
|
||||
<path d="M32.164 10.3818C32.164 12.4699 31.3533 14.4352 29.8815 15.9156C28.4104 17.3949 26.4523 18.2168 24.3669 18.23C24.3617 18.23 24.3561 18.2304 24.3509 18.23C24.3393 18.2304 24.3274 18.2304 24.3154 18.2304C22.2192 18.2304 20.2482 17.4142 18.7658 15.9316C17.2832 14.4493 16.4668 12.4782 16.4668 10.3818C16.4668 8.28539 17.2832 6.31462 18.7658 4.83199C20.2482 3.34961 22.2192 2.5332 24.3154 2.5332C24.3274 2.5332 24.339 2.5332 24.3509 2.53356C24.3565 2.53356 24.362 2.53356 24.3675 2.5338C26.4526 2.54733 28.4107 3.36901 29.8815 4.84828C31.3533 6.32875 32.164 8.29389 32.164 10.3818Z" fill="#FF4756"/>
|
||||
<path d="M32.1636 10.3814C32.1636 12.4696 31.3529 14.4348 29.8811 15.9153C28.4101 17.3946 26.4519 18.2165 24.3665 18.2296C24.3614 18.2296 24.3557 18.23 24.3506 18.2296V2.5332C24.3561 2.5332 24.3616 2.5332 24.3671 2.53344C26.4523 2.54698 28.4103 3.36865 29.8811 4.84792C31.3529 6.32839 32.1636 8.29353 32.1636 10.3814Z" fill="#FF656F"/>
|
||||
<path d="M25.6615 7.14579V10.6543C25.6615 11.3755 25.0749 11.9622 24.3538 11.9622H24.3504C24.0136 11.9524 23.6658 11.8163 23.4289 11.5793C23.1821 11.3322 23.0459 11.0039 23.0459 10.6543V7.14579C23.0459 6.43262 23.638 5.85837 24.3504 5.83789H24.3538C25.0749 5.83789 25.6615 6.42471 25.6615 7.14579Z" fill="white"/>
|
||||
<path d="M25.5919 13.6205C25.5919 14.3033 25.0367 14.8585 24.3539 14.8585H24.3508C23.6699 14.8569 23.1162 14.3023 23.1162 13.6205C23.1162 12.939 23.6699 12.3844 24.3508 12.3828H24.3539C25.0367 12.3828 25.5919 12.938 25.5919 13.6205Z" fill="white"/>
|
||||
<path d="M25.5926 13.6215C25.5926 14.3043 25.0374 14.8595 24.3547 14.8595H24.3516V12.3838H24.3547C25.0374 12.3838 25.5926 12.939 25.5926 13.6215Z" fill="#DDEBF0"/>
|
||||
<path d="M25.6626 7.14676V10.6552C25.6626 11.3764 25.076 11.9631 24.3549 11.9631H24.3516V5.83887H24.3549C25.076 5.83887 25.6626 6.42569 25.6626 7.14676Z" fill="#DDEBF0"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
11
assets/icons/water_leak_normal.svg
Normal file
11
assets/icons/water_leak_normal.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<svg width="33" height="38" viewBox="0 0 33 38" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M29.788 23.1188C29.788 31.3375 23.1198 38 14.894 38C6.66832 38 0 31.3375 0 23.1188C0 15.8539 11.6379 3.1015 14.3389 0.239633C14.6404 -0.0798778 15.1477 -0.0798778 15.4492 0.239633C18.1502 3.10158 29.788 15.8539 29.788 23.1188Z" fill="#B3DAFE"/>
|
||||
<path d="M15.4491 0.239633C15.1476 -0.0798778 14.6403 -0.0798778 14.3388 0.239633C14.1736 0.414715 13.9745 0.627277 13.7471 0.872793C17.2371 4.64154 27.4942 16.2982 27.4942 23.1187C27.4942 30.9518 21.4369 37.3714 13.7471 37.9564C14.1256 37.9852 14.508 37.9999 14.894 37.9999C23.1197 37.9999 29.788 31.3374 29.788 23.1187C29.788 15.8539 18.1502 3.10158 15.4491 0.239633Z" fill="#8AC9FE"/>
|
||||
<path d="M29.7489 24.1975C25.598 22.4389 21.0994 22.7823 9.48614 25.2106C6.87119 25.7574 3.87944 26.4133 0.56543 27.1942C2.33903 33.4317 8.08252 38.0002 14.8941 38.0002C22.7568 38.0002 29.1958 31.9126 29.7489 24.1975Z" fill="#60B7FF"/>
|
||||
<path d="M24.4503 18.2356C28.7786 18.2356 32.2874 14.7268 32.2874 10.3986C32.2874 6.07029 28.7786 2.56152 24.4503 2.56152C20.122 2.56152 16.6133 6.07029 16.6133 10.3986C16.6133 14.7268 20.122 18.2356 24.4503 18.2356Z" fill="#97D729"/>
|
||||
<path d="M24.4809 2.55176C24.0912 2.55176 23.7084 2.58063 23.334 2.63562C27.1139 3.19056 30.0157 6.44645 30.0157 10.3804C30.0157 14.3144 27.1139 17.5703 23.334 18.1252C23.7083 18.1802 24.0912 18.2091 24.4809 18.2091C28.8046 18.2091 32.3095 14.7041 32.3095 10.3804C32.3095 6.05673 28.8046 2.55176 24.4809 2.55176Z" fill="#8BC727"/>
|
||||
<path d="M23.5955 13.7687C23.152 13.7687 22.7351 13.596 22.4217 13.2823L20.0277 10.8884C19.5415 10.4023 19.5415 9.61415 20.0277 9.12794C20.5139 8.64181 21.3021 8.64166 21.7882 9.12794L23.5956 10.9352L27.174 7.35679C27.6602 6.87065 28.4484 6.87065 28.9345 7.35679C29.4207 7.84292 29.4207 8.6312 28.9345 9.11725L24.7693 13.2825C24.4557 13.5961 24.0389 13.7687 23.5955 13.7687Z" fill="#F9F7F8"/>
|
||||
<path d="M29.7489 24.1905C29.0405 23.8904 28.2551 23.6536 27.4901 23.4795C27.457 24.9292 27.2331 26.2952 26.8027 27.6092L28.6417 28.8525C28.9343 28.1675 29.2026 27.3281 29.4251 26.3498C29.6058 25.5549 29.7017 24.8258 29.7489 24.1905Z" fill="#26A6FE"/>
|
||||
<path d="M20.4549 26.3653C12.6679 25.0828 8.6078 20.1017 0.369386 20.6401C0.132109 21.5158 0 22.3486 0 23.1191C0 31.3378 6.66825 38.0003 14.894 38.0003C22.1215 38.0003 28.1457 32.8566 29.5018 26.0334C25.8167 26.8563 22.8019 26.7518 20.4549 26.3653Z" fill="#0593FC"/>
|
||||
<path d="M27.1164 26.4548C25.6828 32.7081 20.3073 37.4589 13.7412 37.9562C14.1215 37.9853 14.5057 38.0001 14.8935 38.0001C22.1209 38.0001 28.1451 32.8564 29.5012 26.0332C28.6723 26.2183 27.8776 26.3561 27.1164 26.4548Z" fill="#0182FC"/>
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
@ -30,6 +30,8 @@ import 'package:syncrow_web/pages/device_managment/wall_sensor/view/wall_sensor_
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/view/wall_sensor_conrtols.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_heater/view/water_heater_batch_control.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_heater/view/water_heater_device_control.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/view/water_leak_batch_control_view.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/view/water_leak_control_view.dart';
|
||||
|
||||
import '../../one_g_glass_switch/view/one_gang_glass_switch_control_view.dart';
|
||||
|
||||
@ -88,6 +90,10 @@ mixin RouteControlsBasedCode {
|
||||
return GarageDoorControlView(
|
||||
deviceId: device.uuid!,
|
||||
);
|
||||
case 'WL':
|
||||
return WaterLeakView(
|
||||
deviceId: device.uuid!,
|
||||
);
|
||||
default:
|
||||
return const SizedBox();
|
||||
}
|
||||
@ -211,6 +217,13 @@ mixin RouteControlsBasedCode {
|
||||
.map((e) => e.uuid!)
|
||||
.toList(),
|
||||
);
|
||||
case 'WL':
|
||||
return WaterLeakBatchControlView(
|
||||
deviceIds: devices
|
||||
.where((e) => (e.productType == 'WL'))
|
||||
.map((e) => e.uuid!)
|
||||
.toList(),
|
||||
);
|
||||
default:
|
||||
return const SizedBox();
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ class ReportsTable extends StatelessWidget {
|
||||
bool? hideValueShowDescription;
|
||||
bool? mainDoorSensor;
|
||||
bool? garageDoorSensor;
|
||||
bool? waterLeak;
|
||||
|
||||
ReportsTable({
|
||||
super.key,
|
||||
@ -25,6 +26,7 @@ class ReportsTable extends StatelessWidget {
|
||||
this.hideValueShowDescription,
|
||||
this.mainDoorSensor,
|
||||
this.garageDoorSensor,
|
||||
this.waterLeak,
|
||||
});
|
||||
|
||||
@override
|
||||
@ -55,7 +57,8 @@ class ReportsTable extends StatelessWidget {
|
||||
DeviceEvent data = entry.value;
|
||||
|
||||
// Parse eventTime into Date and Time
|
||||
DateTime eventDateTime = DateTime.fromMillisecondsSinceEpoch(data.eventTime!);
|
||||
DateTime eventDateTime =
|
||||
DateTime.fromMillisecondsSinceEpoch(data.eventTime!);
|
||||
String date = DateFormat('dd/MM/yyyy').format(eventDateTime);
|
||||
String time = DateFormat('HH:mm').format(eventDateTime);
|
||||
|
||||
@ -63,8 +66,12 @@ class ReportsTable extends StatelessWidget {
|
||||
if (hideValueShowDescription == true) {
|
||||
if (mainDoorSensor != null && mainDoorSensor == true) {
|
||||
value = data.value == 'true' ? 'Open' : 'Close';
|
||||
} else if (garageDoorSensor != null && garageDoorSensor == true) {
|
||||
} else if (garageDoorSensor != null &&
|
||||
garageDoorSensor == true) {
|
||||
value = data.value == 'true' ? 'Opened' : 'Closed';
|
||||
} else if (waterLeak != null && waterLeak == true) {
|
||||
value =
|
||||
data.value == 'normal' ? 'Normal' : 'Leak Detected';
|
||||
} else {
|
||||
value = '${data.value!} ${thirdColumnDescription ?? ''}';
|
||||
}
|
||||
|
173
lib/pages/device_managment/water_leak/bloc/water_leak_bloc.dart
Normal file
173
lib/pages/device_managment/water_leak/bloc/water_leak_bloc.dart
Normal file
@ -0,0 +1,173 @@
|
||||
import 'package:bloc/bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/device_reports.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/device_status.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/bloc/water_leak_event.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/bloc/water_leak_state.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/model/water_leak_status_model.dart';
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:syncrow_web/services/devices_mang_api.dart';
|
||||
|
||||
class WaterLeakBloc extends Bloc<WaterLeakEvent, WaterLeakState> {
|
||||
WaterLeakStatusModel? deviceStatus;
|
||||
Timer? _timer;
|
||||
final String deviceId;
|
||||
|
||||
WaterLeakBloc(this.deviceId) : super(WaterLeakInitialState()) {
|
||||
on<FetchWaterLeakStatusEvent>(_onFetchWaterLeakStatus);
|
||||
on<WaterLeakControlEvent>(_onControl);
|
||||
on<WaterLeakBatchControlEvent>(_onBatchControl);
|
||||
on<FetchWaterLeakBatchStatusEvent>(_onFetchBatchStatus);
|
||||
on<FetchWaterLeakReportsEvent>(_onFetchWaterLeakReports);
|
||||
on<WaterLeakFactoryResetEvent>(_onFactoryReset);
|
||||
}
|
||||
|
||||
Future<void> _onFetchWaterLeakStatus(
|
||||
FetchWaterLeakStatusEvent event, Emitter<WaterLeakState> emit) async {
|
||||
emit(WaterLeakLoadingState());
|
||||
try {
|
||||
final response =
|
||||
await DevicesManagementApi().getDeviceStatus(event.deviceId);
|
||||
deviceStatus = WaterLeakStatusModel.fromJson(deviceId, response.status);
|
||||
emit(WaterLeakLoadedState(deviceStatus!));
|
||||
} catch (e) {
|
||||
emit(WaterLeakErrorState(e.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _onControl(
|
||||
WaterLeakControlEvent event, Emitter<WaterLeakState> emit) async {
|
||||
final oldValue = deviceStatus!.watersensorState;
|
||||
|
||||
_updateLocalValue(event.code, event.value);
|
||||
emit(WaterLeakLoadedState(deviceStatus!));
|
||||
|
||||
await _runDebounce(
|
||||
deviceId: event.deviceId,
|
||||
code: event.code,
|
||||
value: event.value,
|
||||
oldValue: oldValue,
|
||||
emit: emit,
|
||||
isBatch: false,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _onFactoryReset(
|
||||
WaterLeakFactoryResetEvent event, Emitter<WaterLeakState> emit) async {
|
||||
emit(WaterLeakLoadingState());
|
||||
try {
|
||||
final response = await DevicesManagementApi().factoryReset(
|
||||
event.factoryReset,
|
||||
event.deviceId,
|
||||
);
|
||||
if (response) {
|
||||
emit(WaterLeakInitialState());
|
||||
} else {
|
||||
emit(const WaterLeakErrorState('Factory reset failed'));
|
||||
}
|
||||
} catch (e) {
|
||||
emit(WaterLeakErrorState(e.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _onBatchControl(
|
||||
WaterLeakBatchControlEvent event, Emitter<WaterLeakState> emit) async {
|
||||
final oldValue = deviceStatus!.watersensorState;
|
||||
|
||||
_updateLocalValue(event.code, event.value);
|
||||
emit(WaterLeakBatchStatusLoadedState(deviceStatus!));
|
||||
|
||||
await _runDebounce(
|
||||
deviceId: event.deviceIds,
|
||||
code: event.code,
|
||||
value: event.value,
|
||||
oldValue: oldValue,
|
||||
emit: emit,
|
||||
isBatch: true,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _onFetchBatchStatus(FetchWaterLeakBatchStatusEvent event,
|
||||
Emitter<WaterLeakState> emit) async {
|
||||
emit(WaterLeakLoadingState());
|
||||
try {
|
||||
final response =
|
||||
await DevicesManagementApi().getBatchStatus(event.deviceIds);
|
||||
deviceStatus = WaterLeakStatusModel.fromJson(deviceId, response.status);
|
||||
emit(WaterLeakBatchStatusLoadedState(deviceStatus!));
|
||||
} catch (e) {
|
||||
emit(WaterLeakErrorState(e.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _runDebounce({
|
||||
required dynamic deviceId,
|
||||
required String code,
|
||||
required dynamic value,
|
||||
required dynamic oldValue,
|
||||
required Emitter<WaterLeakState> emit,
|
||||
required bool isBatch,
|
||||
}) async {
|
||||
late String id;
|
||||
if (deviceId is List) {
|
||||
id = deviceId.first;
|
||||
} else {
|
||||
id = deviceId;
|
||||
}
|
||||
|
||||
if (_timer != null) {
|
||||
_timer!.cancel();
|
||||
}
|
||||
|
||||
_timer = Timer(const Duration(milliseconds: 500), () async {
|
||||
try {
|
||||
late bool response;
|
||||
if (isBatch) {
|
||||
response = await DevicesManagementApi()
|
||||
.deviceBatchControl(deviceId, code, value);
|
||||
} else {
|
||||
response = await DevicesManagementApi()
|
||||
.deviceControl(deviceId, Status(code: code, value: value));
|
||||
}
|
||||
|
||||
if (!response) {
|
||||
_revertValueAndEmit(id, code, oldValue, emit);
|
||||
}
|
||||
} catch (e) {
|
||||
_revertValueAndEmit(id, code, oldValue, emit);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void _updateLocalValue(String code, dynamic value) {
|
||||
if (code == 'watersensor_state') {
|
||||
deviceStatus = deviceStatus!.copyWith(watersensorState: value);
|
||||
} else if (code == 'battery_percentage') {
|
||||
deviceStatus = deviceStatus!.copyWith(batteryPercentage: value);
|
||||
}
|
||||
}
|
||||
|
||||
void _revertValueAndEmit(String deviceId, String code, dynamic oldValue,
|
||||
Emitter<WaterLeakState> emit) {
|
||||
_updateLocalValue(code, oldValue);
|
||||
emit(WaterLeakLoadedState(deviceStatus!));
|
||||
}
|
||||
|
||||
Future<void> _onFetchWaterLeakReports(
|
||||
FetchWaterLeakReportsEvent event, Emitter<WaterLeakState> emit) async {
|
||||
emit(WaterLeakReportsLoadingState());
|
||||
try {
|
||||
final from = DateTime.now()
|
||||
.subtract(const Duration(days: 30))
|
||||
.millisecondsSinceEpoch;
|
||||
final to = DateTime.now().millisecondsSinceEpoch;
|
||||
final DeviceReport records =
|
||||
await DevicesManagementApi.getDeviceReportsByDate(
|
||||
event.deviceId, event.code, from.toString(), to.toString());
|
||||
emit(WaterLeakReportsLoadedState(records));
|
||||
} catch (e) {
|
||||
emit(WaterLeakReportsFailedState(e.toString()));
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/factory_reset_model.dart';
|
||||
|
||||
abstract class WaterLeakEvent extends Equatable {
|
||||
const WaterLeakEvent();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class FetchWaterLeakStatusEvent extends WaterLeakEvent {
|
||||
final String deviceId;
|
||||
|
||||
const FetchWaterLeakStatusEvent(this.deviceId);
|
||||
|
||||
@override
|
||||
List<Object> get props => [deviceId];
|
||||
}
|
||||
|
||||
class WaterLeakControlEvent extends WaterLeakEvent {
|
||||
final String deviceId;
|
||||
final String code;
|
||||
final dynamic value;
|
||||
|
||||
const WaterLeakControlEvent({
|
||||
required this.deviceId,
|
||||
required this.code,
|
||||
required this.value,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object> get props => [deviceId, code, value];
|
||||
}
|
||||
|
||||
class WaterLeakBatchControlEvent extends WaterLeakEvent {
|
||||
final List<String> deviceIds;
|
||||
final String code;
|
||||
final dynamic value;
|
||||
|
||||
const WaterLeakBatchControlEvent({
|
||||
required this.deviceIds,
|
||||
required this.code,
|
||||
required this.value,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object> get props => [deviceIds, code, value];
|
||||
}
|
||||
|
||||
class FetchWaterLeakBatchStatusEvent extends WaterLeakEvent {
|
||||
final List<String> deviceIds;
|
||||
|
||||
const FetchWaterLeakBatchStatusEvent(this.deviceIds);
|
||||
|
||||
@override
|
||||
List<Object> get props => [deviceIds];
|
||||
}
|
||||
|
||||
class FetchWaterLeakReportsEvent extends WaterLeakEvent {
|
||||
final String deviceId;
|
||||
final String code;
|
||||
final int from;
|
||||
final int to;
|
||||
|
||||
const FetchWaterLeakReportsEvent({
|
||||
required this.deviceId,
|
||||
required this.code,
|
||||
required this.from,
|
||||
required this.to,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object> get props => [deviceId, code, from, to];
|
||||
}
|
||||
|
||||
class WaterLeakFactoryResetEvent extends WaterLeakEvent {
|
||||
final String deviceId;
|
||||
final FactoryResetModel factoryReset;
|
||||
|
||||
const WaterLeakFactoryResetEvent({
|
||||
required this.deviceId,
|
||||
required this.factoryReset,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object> get props => [deviceId];
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/device_reports.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/model/water_leak_status_model.dart';
|
||||
|
||||
abstract class WaterLeakState extends Equatable {
|
||||
const WaterLeakState();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class WaterLeakInitialState extends WaterLeakState {}
|
||||
|
||||
class WaterLeakLoadingState extends WaterLeakState {}
|
||||
|
||||
class WaterLeakLoadedState extends WaterLeakState {
|
||||
final WaterLeakStatusModel status;
|
||||
|
||||
const WaterLeakLoadedState(this.status);
|
||||
|
||||
@override
|
||||
List<Object> get props => [status];
|
||||
}
|
||||
|
||||
class WaterLeakBatchStatusLoadedState extends WaterLeakState {
|
||||
final WaterLeakStatusModel status;
|
||||
|
||||
const WaterLeakBatchStatusLoadedState(this.status);
|
||||
|
||||
@override
|
||||
List<Object> get props => [status];
|
||||
}
|
||||
|
||||
class WaterLeakErrorState extends WaterLeakState {
|
||||
final String message;
|
||||
|
||||
const WaterLeakErrorState(this.message);
|
||||
|
||||
@override
|
||||
List<Object> get props => [message];
|
||||
}
|
||||
|
||||
class WaterLeakReportsLoadingState extends WaterLeakState {}
|
||||
|
||||
class WaterLeakReportsLoadedState extends WaterLeakState {
|
||||
final DeviceReport deviceReport;
|
||||
|
||||
const WaterLeakReportsLoadedState(this.deviceReport);
|
||||
|
||||
@override
|
||||
List<Object> get props => [deviceReport];
|
||||
}
|
||||
|
||||
class WaterLeakReportsFailedState extends WaterLeakState {
|
||||
final String error;
|
||||
|
||||
const WaterLeakReportsFailedState(this.error);
|
||||
|
||||
@override
|
||||
List<Object> get props => [error];
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/device_status.dart';
|
||||
|
||||
class WaterLeakStatusModel {
|
||||
final String productUuid;
|
||||
final String productType;
|
||||
final String watersensorState;
|
||||
final int batteryPercentage;
|
||||
|
||||
WaterLeakStatusModel({
|
||||
required this.productUuid,
|
||||
required this.productType,
|
||||
required this.watersensorState,
|
||||
required this.batteryPercentage,
|
||||
});
|
||||
factory WaterLeakStatusModel.fromJson(String id, List<Status> jsonList) {
|
||||
late String watersensorState;
|
||||
late int batteryPercentage;
|
||||
|
||||
for (var i = 0; i < jsonList.length; i++) {
|
||||
if (jsonList[i].code == 'watersensor_state') {
|
||||
watersensorState = jsonList[i].value;
|
||||
} else if (jsonList[i].code == 'battery_percentage') {
|
||||
batteryPercentage = jsonList[i].value;
|
||||
}
|
||||
}
|
||||
|
||||
return WaterLeakStatusModel(
|
||||
productUuid: id,
|
||||
productType: 'WL',
|
||||
watersensorState: watersensorState,
|
||||
batteryPercentage: batteryPercentage,
|
||||
);
|
||||
}
|
||||
|
||||
WaterLeakStatusModel copyWith({
|
||||
String? productUuid,
|
||||
String? productType,
|
||||
String? watersensorState,
|
||||
int? batteryPercentage,
|
||||
}) {
|
||||
return WaterLeakStatusModel(
|
||||
productUuid: productUuid ?? this.productUuid,
|
||||
productType: productType ?? this.productType,
|
||||
watersensorState: watersensorState ?? this.watersensorState,
|
||||
batteryPercentage: batteryPercentage ?? this.batteryPercentage,
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/factory_reset_model.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/shared/batch_control/factory_reset.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/shared/batch_control/firmware_update.dart';
|
||||
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/bloc/water_leak_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/bloc/water_leak_event.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/bloc/water_leak_state.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/model/water_leak_status_model.dart';
|
||||
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
||||
|
||||
class WaterLeakBatchControlView extends StatelessWidget
|
||||
with HelperResponsiveLayout {
|
||||
final List<String> deviceIds;
|
||||
|
||||
const WaterLeakBatchControlView({Key? key, required this.deviceIds})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider(
|
||||
create: (context) => WaterLeakBloc(deviceIds.first)
|
||||
..add(FetchWaterLeakBatchStatusEvent(deviceIds)),
|
||||
child: BlocBuilder<WaterLeakBloc, WaterLeakState>(
|
||||
builder: (context, state) {
|
||||
if (state is WaterLeakLoadingState) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (state is WaterLeakBatchStatusLoadedState) {
|
||||
return _buildStatusControls(context, state.status);
|
||||
} else if (state is WaterLeakErrorState) {
|
||||
return Center(child: Text('Error: ${state.message}'));
|
||||
} else {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildStatusControls(
|
||||
BuildContext context, WaterLeakStatusModel status) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 170,
|
||||
height: 140,
|
||||
child: FirmwareUpdateWidget(deviceId: deviceIds.first, version: 2)),
|
||||
const SizedBox(
|
||||
width: 12,
|
||||
),
|
||||
SizedBox(
|
||||
width: 170,
|
||||
height: 140,
|
||||
child: FactoryResetWidget(
|
||||
callFactoryReset: () {
|
||||
context.read<WaterLeakBloc>().add(WaterLeakFactoryResetEvent(
|
||||
deviceId: deviceIds.first,
|
||||
factoryReset: FactoryResetModel(devicesUuid: deviceIds)));
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/main_door_sensor/view/main_door_control_view.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/bloc/water_leak_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/bloc/water_leak_event.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/bloc/water_leak_state.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/water_leak/widgets/water_leak_notifi_dialog.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/shared/table/report_table.dart';
|
||||
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
||||
|
||||
class WaterLeakView extends StatelessWidget with HelperResponsiveLayout {
|
||||
final String deviceId;
|
||||
|
||||
const WaterLeakView({Key? key, required this.deviceId}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isExtraLarge = isExtraLargeScreenSize(context);
|
||||
final isLarge = isLargeScreenSize(context);
|
||||
final isMedium = isMediumScreenSize(context);
|
||||
return BlocProvider(
|
||||
create: (context) =>
|
||||
WaterLeakBloc(deviceId)..add(FetchWaterLeakStatusEvent(deviceId)),
|
||||
child: BlocBuilder<WaterLeakBloc, WaterLeakState>(
|
||||
builder: (context, state) {
|
||||
if (state is WaterLeakLoadingState) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (state is WaterLeakLoadedState) {
|
||||
return GridView(
|
||||
shrinkWrap: true,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 50),
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: isExtraLarge || isLarge
|
||||
? 3
|
||||
: isMedium
|
||||
? 2
|
||||
: 1,
|
||||
mainAxisExtent: 140,
|
||||
crossAxisSpacing: 12,
|
||||
mainAxisSpacing: 12,
|
||||
),
|
||||
children: [
|
||||
IconNameStatusContainer(
|
||||
isFullIcon: false,
|
||||
name: state.status.watersensorState == 'normal'
|
||||
? 'Normal'
|
||||
: 'Leak Detection',
|
||||
icon: state.status.watersensorState == 'normal'
|
||||
? Assets.waterLeakNormal
|
||||
: Assets.waterLeakDetected,
|
||||
onTap: () {},
|
||||
status: state.status.watersensorState == 'normal',
|
||||
textColor: state.status.watersensorState == 'normal'
|
||||
? ColorsManager.blackColor
|
||||
: ColorsManager.red,
|
||||
),
|
||||
IconNameStatusContainer(
|
||||
isFullIcon: false,
|
||||
name: 'Records',
|
||||
icon: Assets.records,
|
||||
onTap: () {
|
||||
context
|
||||
.read<WaterLeakBloc>()
|
||||
.add(FetchWaterLeakReportsEvent(
|
||||
deviceId: deviceId,
|
||||
code: 'watersensor_state',
|
||||
from: DateTime.now()
|
||||
.subtract(const Duration(days: 30))
|
||||
.millisecondsSinceEpoch,
|
||||
to: DateTime.now().millisecondsSinceEpoch,
|
||||
));
|
||||
},
|
||||
status: false,
|
||||
textColor: ColorsManager.blackColor,
|
||||
),
|
||||
IconNameStatusContainer(
|
||||
isFullIcon: false,
|
||||
name: 'Automation Record',
|
||||
icon: Assets.automationRecords,
|
||||
onTap: () {},
|
||||
status: false,
|
||||
textColor: ColorsManager.blackColor,
|
||||
),
|
||||
IconNameStatusContainer(
|
||||
isFullIcon: false,
|
||||
name: 'Notifications\nSettings',
|
||||
icon: Assets.mainDoorNotifi,
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => const WaterLeakNotificationDialog(),
|
||||
);
|
||||
},
|
||||
status: false,
|
||||
textColor: ColorsManager.blackColor,
|
||||
paddingAmount: 14,
|
||||
),
|
||||
],
|
||||
);
|
||||
} else if (state is WaterLeakReportsLoadingState) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (state is WaterLeakReportsLoadedState) {
|
||||
return ReportsTable(
|
||||
report: state.deviceReport,
|
||||
hideValueShowDescription: true,
|
||||
waterLeak: true,
|
||||
onRowTap: (index) {},
|
||||
onClose: () {
|
||||
context
|
||||
.read<WaterLeakBloc>()
|
||||
.add(FetchWaterLeakStatusEvent(deviceId));
|
||||
},
|
||||
);
|
||||
} else if (state is WaterLeakReportsFailedState) {
|
||||
return Center(child: Text('Error: ${state.error}'));
|
||||
} else if (state is WaterLeakErrorState) {
|
||||
return Center(child: Text('Error: ${state.message}'));
|
||||
} else {
|
||||
return const Center(child: Text('No data available'));
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/shared/toggle_widget.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
|
||||
class WaterLeakNotificationDialog extends StatelessWidget {
|
||||
const WaterLeakNotificationDialog({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Dialog(
|
||||
backgroundColor: Colors.white,
|
||||
insetPadding: const EdgeInsets.all(20),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: SizedBox(
|
||||
width: 400,
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const SizedBox(),
|
||||
Text(
|
||||
'Notification Settings',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 22,
|
||||
color: ColorsManager.dialogBlueTitle,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 25,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: Colors.grey,
|
||||
width: 1.0,
|
||||
),
|
||||
),
|
||||
child: IconButton(
|
||||
padding: EdgeInsets.all(1),
|
||||
icon: const Icon(
|
||||
Icons.close,
|
||||
color: Colors.grey,
|
||||
size: 18,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
ToggleWidget(
|
||||
value: true,
|
||||
code: 'notification',
|
||||
deviceId: '',
|
||||
label: 'Low Battery',
|
||||
onChange: (v) {},
|
||||
icon: '-1',
|
||||
),
|
||||
ToggleWidget(
|
||||
value: true,
|
||||
code: 'notification',
|
||||
deviceId: '',
|
||||
label: 'Water Leakage',
|
||||
onChange: (v) {},
|
||||
icon: '-1',
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -13,10 +13,12 @@ class Assets {
|
||||
static const String rightLine = "assets/images/right_line.png";
|
||||
static const String google = "assets/images/google.svg";
|
||||
static const String facebook = "assets/images/facebook.svg";
|
||||
static const String invisiblePassword = "assets/images/Password_invisible.svg";
|
||||
static const String invisiblePassword =
|
||||
"assets/images/Password_invisible.svg";
|
||||
static const String visiblePassword = "assets/images/password_visible.svg";
|
||||
static const String accessIcon = "assets/images/access_icon.svg";
|
||||
static const String spaseManagementIcon = "assets/images/spase_management_icon.svg";
|
||||
static const String spaseManagementIcon =
|
||||
"assets/images/spase_management_icon.svg";
|
||||
static const String devicesIcon = "assets/images/devices_icon.svg";
|
||||
static const String moveinIcon = "assets/images/movein_icon.svg";
|
||||
static const String constructionIcon = "assets/images/construction_icon.svg";
|
||||
@ -29,13 +31,15 @@ class Assets {
|
||||
static const String emptyTable = "assets/images/empty_table.svg";
|
||||
|
||||
// General assets
|
||||
static const String motionlessDetection = "assets/icons/motionless_detection.svg";
|
||||
static const String motionlessDetection =
|
||||
"assets/icons/motionless_detection.svg";
|
||||
static const String acHeating = "assets/icons/ac_heating.svg";
|
||||
static const String acPowerOff = "assets/icons/ac_power_off.svg";
|
||||
static const String acFanMiddle = "assets/icons/ac_fan_middle.svg";
|
||||
static const String switchAlarmSound = "assets/icons/switch_alarm_sound.svg";
|
||||
static const String resetOff = "assets/icons/reset_off.svg";
|
||||
static const String sensitivityOperationIcon = "assets/icons/sesitivity_operation_icon.svg";
|
||||
static const String sensitivityOperationIcon =
|
||||
"assets/icons/sesitivity_operation_icon.svg";
|
||||
static const String motionDetection = "assets/icons/motion_detection.svg";
|
||||
static const String freezing = "assets/icons/freezing.svg";
|
||||
static const String indicator = "assets/icons/indicator.svg";
|
||||
@ -56,35 +60,56 @@ class Assets {
|
||||
static const String celsiusDegrees = "assets/icons/celsius_degrees.svg";
|
||||
static const String masterState = "assets/icons/master_state.svg";
|
||||
static const String acPower = "assets/icons/ac_power.svg";
|
||||
static const String farDetectionFunction = "assets/icons/far_detection_function.svg";
|
||||
static const String farDetectionFunction =
|
||||
"assets/icons/far_detection_function.svg";
|
||||
static const String nobodyTime = "assets/icons/nobody_time.svg";
|
||||
|
||||
// Automation functions
|
||||
static const String tempPasswordUnlock = "assets/icons/automation_functions/temp_password_unlock.svg";
|
||||
static const String doorlockNormalOpen = "assets/icons/automation_functions/doorlock_normal_open.svg";
|
||||
static const String doorbell = "assets/icons/automation_functions/doorbell.svg";
|
||||
static const String remoteUnlockViaApp = "assets/icons/automation_functions/remote_unlock_via_app.svg";
|
||||
static const String doubleLock = "assets/icons/automation_functions/double_lock.svg";
|
||||
static const String selfTestResult = "assets/icons/automation_functions/self_test_result.svg";
|
||||
static const String lockAlarm = "assets/icons/automation_functions/lock_alarm.svg";
|
||||
static const String presenceState = "assets/icons/automation_functions/presence_state.svg";
|
||||
static const String currentTemp = "assets/icons/automation_functions/current_temp.svg";
|
||||
static const String presence = "assets/icons/automation_functions/presence.svg";
|
||||
static const String residualElectricity = "assets/icons/automation_functions/residual_electricity.svg";
|
||||
static const String hijackAlarm = "assets/icons/automation_functions/hijack_alarm.svg";
|
||||
static const String passwordUnlock = "assets/icons/automation_functions/password_unlock.svg";
|
||||
static const String remoteUnlockRequest = "assets/icons/automation_functions/remote_unlock_req.svg";
|
||||
static const String cardUnlock = "assets/icons/automation_functions/card_unlock.svg";
|
||||
static const String tempPasswordUnlock =
|
||||
"assets/icons/automation_functions/temp_password_unlock.svg";
|
||||
static const String doorlockNormalOpen =
|
||||
"assets/icons/automation_functions/doorlock_normal_open.svg";
|
||||
static const String doorbell =
|
||||
"assets/icons/automation_functions/doorbell.svg";
|
||||
static const String remoteUnlockViaApp =
|
||||
"assets/icons/automation_functions/remote_unlock_via_app.svg";
|
||||
static const String doubleLock =
|
||||
"assets/icons/automation_functions/double_lock.svg";
|
||||
static const String selfTestResult =
|
||||
"assets/icons/automation_functions/self_test_result.svg";
|
||||
static const String lockAlarm =
|
||||
"assets/icons/automation_functions/lock_alarm.svg";
|
||||
static const String presenceState =
|
||||
"assets/icons/automation_functions/presence_state.svg";
|
||||
static const String currentTemp =
|
||||
"assets/icons/automation_functions/current_temp.svg";
|
||||
static const String presence =
|
||||
"assets/icons/automation_functions/presence.svg";
|
||||
static const String residualElectricity =
|
||||
"assets/icons/automation_functions/residual_electricity.svg";
|
||||
static const String hijackAlarm =
|
||||
"assets/icons/automation_functions/hijack_alarm.svg";
|
||||
static const String passwordUnlock =
|
||||
"assets/icons/automation_functions/password_unlock.svg";
|
||||
static const String remoteUnlockRequest =
|
||||
"assets/icons/automation_functions/remote_unlock_req.svg";
|
||||
static const String cardUnlock =
|
||||
"assets/icons/automation_functions/card_unlock.svg";
|
||||
static const String motion = "assets/icons/automation_functions/motion.svg";
|
||||
static const String fingerprintUnlock = "assets/icons/automation_functions/fingerprint_unlock.svg";
|
||||
static const String fingerprintUnlock =
|
||||
"assets/icons/automation_functions/fingerprint_unlock.svg";
|
||||
|
||||
// Presence Sensor Assets
|
||||
static const String sensorMotionIcon = "assets/icons/sensor_motion_ic.svg";
|
||||
static const String sensorPresenceIcon = "assets/icons/sensor_presence_ic.svg";
|
||||
static const String sensorPresenceIcon =
|
||||
"assets/icons/sensor_presence_ic.svg";
|
||||
static const String sensorVacantIcon = "assets/icons/sensor_vacant_ic.svg";
|
||||
static const String illuminanceRecordIcon = "assets/icons/illuminance_record_ic.svg";
|
||||
static const String presenceRecordIcon = "assets/icons/presence_record_ic.svg";
|
||||
static const String helpDescriptionIcon = "assets/icons/help_description_ic.svg";
|
||||
static const String illuminanceRecordIcon =
|
||||
"assets/icons/illuminance_record_ic.svg";
|
||||
static const String presenceRecordIcon =
|
||||
"assets/icons/presence_record_ic.svg";
|
||||
static const String helpDescriptionIcon =
|
||||
"assets/icons/help_description_ic.svg";
|
||||
|
||||
static const String lightPulp = "assets/icons/light_pulb.svg";
|
||||
static const String acDevice = "assets/icons/ac_device.svg";
|
||||
@ -155,4 +180,12 @@ class Assets {
|
||||
static const String closedDoor = 'assets/icons/closed_door.svg';
|
||||
static const String doorDelay = 'assets/icons/door_delay.svg';
|
||||
static const String records = 'assets/icons/records.svg';
|
||||
//assets/icons/water_leak_normal.svg
|
||||
static const String waterLeakNormal = 'assets/icons/water_leak_normal.svg';
|
||||
//assets/icons/water_leak_detected.svg
|
||||
static const String waterLeakDetected =
|
||||
'assets/icons/water_leak_detected.svg';
|
||||
|
||||
//assets/icons/automation_records.svg
|
||||
static const String automationRecords = 'assets/icons/automation_records.svg';
|
||||
}
|
||||
|
Reference in New Issue
Block a user