mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Implemented WPS device
This commit is contained in:
@ -3,21 +3,24 @@ import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/ac/view/ac_device_control.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/living_room_switch/view/living_room_device_control.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/view/wall_sensor_conrtols.dart';
|
||||
|
||||
mixin RouteControlsBasedCode {
|
||||
Widget routeControlsWidgets({required AllDevicesModel device}) {
|
||||
switch (device.categoryName) {
|
||||
case 'Switch':
|
||||
switch (device.productType) {
|
||||
case '3G':
|
||||
return LivingRoomDeviceControl(
|
||||
device: device,
|
||||
);
|
||||
case 'Gateway':
|
||||
case 'GW':
|
||||
return const SizedBox();
|
||||
case 'Residential Lock PRO':
|
||||
case 'DL':
|
||||
return const SizedBox();
|
||||
case 'Human Presence Sensor':
|
||||
case 'WPS':
|
||||
return WallSensorControls(device: device);
|
||||
case 'CPS':
|
||||
return const SizedBox();
|
||||
case 'Thermostat':
|
||||
case 'AC':
|
||||
return AcDeviceControl(device: device);
|
||||
default:
|
||||
return const SizedBox();
|
||||
|
87
lib/pages/device_managment/wall_sensor/bloc/bloc.dart
Normal file
87
lib/pages/device_managment/wall_sensor/bloc/bloc.dart
Normal file
@ -0,0 +1,87 @@
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/device_status.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/bloc/event.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/bloc/state.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/model/wall_sensor_model.dart';
|
||||
import 'package:syncrow_web/services/devices_mang_api.dart';
|
||||
|
||||
class WallSensorBloc extends Bloc<WallSensorEvent, WallSensorState> {
|
||||
final String deviceId;
|
||||
late WallSensorModel deviceStatus;
|
||||
|
||||
WallSensorBloc({required this.deviceId}) : super(InitialState()) {
|
||||
on<WallSensorInitialEvent>(_fetchCeilingSensorStatus);
|
||||
on<ChangeIndicatorEvent>(_changeIndicator);
|
||||
on<ChangeValueEvent>(_changeValue);
|
||||
on<WallSensorUpdatedEvent>(_wallSensorUpdated);
|
||||
}
|
||||
|
||||
void _fetchCeilingSensorStatus(
|
||||
WallSensorInitialEvent event, Emitter<WallSensorState> emit) async {
|
||||
emit(LoadingInitialState());
|
||||
try {
|
||||
var response = await DevicesManagementApi().getDeviceStatus(deviceId);
|
||||
deviceStatus = WallSensorModel.fromJson(response.status);
|
||||
emit(UpdateState(wallSensorModel: deviceStatus));
|
||||
// _listenToChanges();
|
||||
} catch (e) {
|
||||
emit(FailedState(error: e.toString()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// _listenToChanges() {
|
||||
// try {
|
||||
// DatabaseReference ref = FirebaseDatabase.instance.ref('device-status/$deviceId');
|
||||
// Stream<DatabaseEvent> stream = ref.onValue;
|
||||
|
||||
// stream.listen((DatabaseEvent event) {
|
||||
// Map<dynamic, dynamic> usersMap = event.snapshot.value as Map<dynamic, dynamic>;
|
||||
// List<StatusModel> statusList = [];
|
||||
|
||||
// usersMap['status'].forEach((element) {
|
||||
// statusList.add(StatusModel(code: element['code'], value: element['value']));
|
||||
// });
|
||||
|
||||
// deviceStatus = WallSensorModel.fromJson(statusList);
|
||||
// add(WallSensorUpdatedEvent());
|
||||
// });
|
||||
// } catch (_) {}
|
||||
// }
|
||||
|
||||
_wallSensorUpdated(WallSensorUpdatedEvent event, Emitter<WallSensorState> emit) {
|
||||
emit(UpdateState(wallSensorModel: deviceStatus));
|
||||
}
|
||||
|
||||
void _changeIndicator(ChangeIndicatorEvent event, Emitter<WallSensorState> emit) async {
|
||||
emit(LoadingNewSate(wallSensorModel: deviceStatus));
|
||||
try {
|
||||
final response = await DevicesManagementApi()
|
||||
.deviceControl(deviceId, Status(code: 'indicator', value: !event.value));
|
||||
|
||||
if (response) {
|
||||
deviceStatus.indicator = !event.value;
|
||||
}
|
||||
} catch (_) {}
|
||||
emit(UpdateState(wallSensorModel: deviceStatus));
|
||||
}
|
||||
|
||||
void _changeValue(ChangeValueEvent event, Emitter<WallSensorState> emit) async {
|
||||
emit(LoadingNewSate(wallSensorModel: deviceStatus));
|
||||
try {
|
||||
final response = await DevicesManagementApi()
|
||||
.deviceControl(deviceId, Status(code: event.code, value: event.value));
|
||||
|
||||
if (response) {
|
||||
if (event.code == 'far_detection') {
|
||||
deviceStatus.farDetection = event.value;
|
||||
} else if (event.code == 'motionless_sensitivity') {
|
||||
deviceStatus.motionlessSensitivity = event.value;
|
||||
} else if (event.code == 'motion_sensitivity_value') {
|
||||
deviceStatus.motionSensitivity = event.value;
|
||||
}
|
||||
}
|
||||
} catch (_) {}
|
||||
emit(UpdateState(wallSensorModel: deviceStatus));
|
||||
}
|
||||
}
|
31
lib/pages/device_managment/wall_sensor/bloc/event.dart
Normal file
31
lib/pages/device_managment/wall_sensor/bloc/event.dart
Normal file
@ -0,0 +1,31 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
abstract class WallSensorEvent extends Equatable {
|
||||
const WallSensorEvent();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class WallSensorLoadingEvent extends WallSensorEvent {}
|
||||
|
||||
class WallSensorInitialEvent extends WallSensorEvent {}
|
||||
|
||||
class WallSensorUpdatedEvent extends WallSensorEvent {}
|
||||
|
||||
class ChangeIndicatorEvent extends WallSensorEvent {
|
||||
final bool value;
|
||||
const ChangeIndicatorEvent({required this.value});
|
||||
|
||||
@override
|
||||
List<Object> get props => [value];
|
||||
}
|
||||
|
||||
class ChangeValueEvent extends WallSensorEvent {
|
||||
final int value;
|
||||
final String code;
|
||||
const ChangeValueEvent({required this.value, required this.code});
|
||||
|
||||
@override
|
||||
List<Object> get props => [value, code];
|
||||
}
|
38
lib/pages/device_managment/wall_sensor/bloc/state.dart
Normal file
38
lib/pages/device_managment/wall_sensor/bloc/state.dart
Normal file
@ -0,0 +1,38 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/model/wall_sensor_model.dart';
|
||||
|
||||
class WallSensorState extends Equatable {
|
||||
const WallSensorState();
|
||||
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
||||
|
||||
class InitialState extends WallSensorState {}
|
||||
|
||||
class LoadingInitialState extends WallSensorState {}
|
||||
|
||||
class UpdateState extends WallSensorState {
|
||||
final WallSensorModel wallSensorModel;
|
||||
const UpdateState({required this.wallSensorModel});
|
||||
|
||||
@override
|
||||
List<Object> get props => [wallSensorModel];
|
||||
}
|
||||
|
||||
class LoadingNewSate extends WallSensorState {
|
||||
final WallSensorModel wallSensorModel;
|
||||
const LoadingNewSate({required this.wallSensorModel});
|
||||
|
||||
@override
|
||||
List<Object> get props => [wallSensorModel];
|
||||
}
|
||||
|
||||
class FailedState extends WallSensorState {
|
||||
final String error;
|
||||
|
||||
const FailedState({required this.error});
|
||||
|
||||
@override
|
||||
List<Object> get props => [error];
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/device_status.dart';
|
||||
|
||||
class WallSensorModel {
|
||||
String presenceState;
|
||||
int farDetection;
|
||||
int presenceTime;
|
||||
int motionSensitivity;
|
||||
int motionlessSensitivity;
|
||||
int currentDistance;
|
||||
int illuminance;
|
||||
bool indicator;
|
||||
|
||||
WallSensorModel({
|
||||
required this.presenceState,
|
||||
required this.farDetection,
|
||||
required this.presenceTime,
|
||||
required this.motionSensitivity,
|
||||
required this.motionlessSensitivity,
|
||||
required this.currentDistance,
|
||||
required this.illuminance,
|
||||
required this.indicator,
|
||||
});
|
||||
|
||||
factory WallSensorModel.fromJson(List<Status> jsonList) {
|
||||
late String _presenceState;
|
||||
late int _farDetection;
|
||||
late int _presenceTime;
|
||||
late int _motionSensitivity;
|
||||
late int _motionlessSensitivity;
|
||||
late int _currentDistance;
|
||||
late int _illuminance;
|
||||
late bool _indicator;
|
||||
|
||||
for (int i = 0; i < jsonList.length; i++) {
|
||||
if (jsonList[i].code == 'presence_state') {
|
||||
_presenceState = jsonList[i].value ?? 'none';
|
||||
} else if (jsonList[i].code == 'far_detection') {
|
||||
_farDetection = jsonList[i].value ?? 0;
|
||||
} else if (jsonList[i].code == 'presence_time') {
|
||||
_presenceTime = jsonList[i].value ?? 0;
|
||||
} else if (jsonList[i].code == 'motion_sensitivity_value') {
|
||||
_motionSensitivity = jsonList[i].value ?? 0;
|
||||
} else if (jsonList[i].code == 'motionless_sensitivity') {
|
||||
_motionlessSensitivity = jsonList[i].value ?? 0;
|
||||
} else if (jsonList[i].code == 'dis_current') {
|
||||
_currentDistance = jsonList[i].value ?? 0;
|
||||
} else if (jsonList[i].code == 'illuminance_value') {
|
||||
_illuminance = jsonList[i].value ?? 0;
|
||||
} else if (jsonList[i].code == 'indicator') {
|
||||
_indicator = jsonList[i].value ?? false;
|
||||
}
|
||||
}
|
||||
return WallSensorModel(
|
||||
presenceState: _presenceState,
|
||||
farDetection: _farDetection,
|
||||
presenceTime: _presenceTime,
|
||||
motionSensitivity: _motionSensitivity,
|
||||
motionlessSensitivity: _motionlessSensitivity,
|
||||
currentDistance: _currentDistance,
|
||||
illuminance: _illuminance,
|
||||
indicator: _indicator);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/bloc/bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/bloc/event.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/bloc/state.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/view/widgets/presence_display_data.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/view/widgets/presence_status.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/wall_sensor/view/widgets/presence_update_data.dart';
|
||||
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
||||
|
||||
class WallSensorControls extends StatelessWidget with HelperResponsiveLayout {
|
||||
const WallSensorControls({super.key, required this.device});
|
||||
|
||||
final AllDevicesModel device;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isLarge = isLargeScreenSize(context);
|
||||
final isMedium = isMediumScreenSize(context);
|
||||
return BlocProvider(
|
||||
create: (context) => WallSensorBloc(deviceId: device.uuid!)..add(WallSensorInitialEvent()),
|
||||
child: BlocBuilder<WallSensorBloc, WallSensorState>(
|
||||
builder: (context, state) {
|
||||
if (state is LoadingInitialState) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (state is UpdateState) {
|
||||
return GridView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 50),
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: isLarge
|
||||
? 3
|
||||
: isMedium
|
||||
? 2
|
||||
: 1,
|
||||
mainAxisExtent: 133,
|
||||
crossAxisSpacing: 12,
|
||||
mainAxisSpacing: 12,
|
||||
),
|
||||
children: [
|
||||
PresenceState(
|
||||
value: state.wallSensorModel.presenceState,
|
||||
),
|
||||
PresenceDisplayValue(
|
||||
value: state.wallSensorModel.presenceTime.toString(),
|
||||
postfix: 'min',
|
||||
description: 'Presence Time',
|
||||
),
|
||||
PresenceDisplayValue(
|
||||
value: state.wallSensorModel.currentDistance.toString(),
|
||||
postfix: 'cm',
|
||||
description: 'Current Distance',
|
||||
),
|
||||
PresenceDisplayValue(
|
||||
value: state.wallSensorModel.illuminance.toString(),
|
||||
postfix: 'Lux',
|
||||
description: 'Illuminance Value',
|
||||
),
|
||||
PresenceUpdateData(
|
||||
value: state.wallSensorModel.motionSensitivity.toDouble(),
|
||||
title: 'Motion Detection Sensitivity:',
|
||||
minValue: 1,
|
||||
maxValue: 10,
|
||||
action: (int value) {
|
||||
context.read<WallSensorBloc>().add(
|
||||
ChangeValueEvent(
|
||||
code: 'motion_sensitivity_value',
|
||||
value: value,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
PresenceUpdateData(
|
||||
value: state.wallSensorModel.motionlessSensitivity.toDouble(),
|
||||
title: 'Motionless Detection Sensitivity:',
|
||||
minValue: 1,
|
||||
maxValue: 10,
|
||||
action: (int value) => context.read<WallSensorBloc>().add(
|
||||
ChangeValueEvent(
|
||||
code: 'motionless_sensitivity',
|
||||
value: value,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
} else {
|
||||
return const Center(child: Text('Error fetching status'));
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
|
||||
class PresenceDisplayValue extends StatelessWidget {
|
||||
const PresenceDisplayValue(
|
||||
{super.key, required this.value, required this.postfix, required this.description});
|
||||
|
||||
final String value;
|
||||
final String postfix;
|
||||
final String description;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: ColorsManager.greyColor.withOpacity(0.2),
|
||||
border: Border.all(color: ColorsManager.boxDivider),
|
||||
),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
value,
|
||||
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
|
||||
color: ColorsManager.dialogBlueTitle,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w400),
|
||||
),
|
||||
Text(
|
||||
postfix,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(color: ColorsManager.blackColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
description,
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.blackColor, fontWeight: FontWeight.w400, fontSize: 16),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
|
||||
class PresenceState extends StatelessWidget {
|
||||
const PresenceState({
|
||||
super.key,
|
||||
required this.value,
|
||||
});
|
||||
|
||||
final String value;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: ColorsManager.greyColor.withOpacity(0.2),
|
||||
border: Border.all(color: ColorsManager.boxDivider),
|
||||
),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Status:',
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(color: ColorsManager.blackColor),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
SvgPicture.asset(
|
||||
value.toLowerCase() == 'motion' ? Assets.sensorMotion : Assets.sensorPresence,
|
||||
width: 20,
|
||||
height: 20,
|
||||
),
|
||||
Text(
|
||||
value,
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.blackColor, fontWeight: FontWeight.w400, fontSize: 16),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/shared/increament_decreament.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
|
||||
class PresenceUpdateData extends StatefulWidget {
|
||||
const PresenceUpdateData({
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.value,
|
||||
required this.action,
|
||||
required this.minValue,
|
||||
required this.maxValue,
|
||||
this.description,
|
||||
});
|
||||
final String title;
|
||||
final double value;
|
||||
final double minValue;
|
||||
final double maxValue;
|
||||
final Function action;
|
||||
final String? description;
|
||||
|
||||
@override
|
||||
State<PresenceUpdateData> createState() => _CurrentTempState();
|
||||
}
|
||||
|
||||
class _CurrentTempState extends State<PresenceUpdateData> {
|
||||
late double _adjustedValue;
|
||||
Timer? _debounce;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_adjustedValue = _initialAdjustedValue(widget.value);
|
||||
}
|
||||
|
||||
double _initialAdjustedValue(dynamic value) {
|
||||
if (value is int || value is double) {
|
||||
return value;
|
||||
} else {
|
||||
throw ArgumentError('Invalid value type: Expected int or double');
|
||||
}
|
||||
}
|
||||
|
||||
void _onValueChanged(double newValue) {
|
||||
if (_debounce?.isActive ?? false) {
|
||||
_debounce?.cancel();
|
||||
}
|
||||
_debounce = Timer(const Duration(milliseconds: 500), () {
|
||||
widget.action(newValue.toInt());
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_debounce?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: ColorsManager.greyColor.withOpacity(0.2),
|
||||
border: Border.all(color: ColorsManager.boxDivider),
|
||||
),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
widget.title,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(color: ColorsManager.blackColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
IncrementDecrementWidget(
|
||||
value: widget.value.toString(),
|
||||
description: widget.description ?? '',
|
||||
descriptionColor: ColorsManager.dialogBlueTitle,
|
||||
onIncrement: () {
|
||||
if (_adjustedValue < widget.maxValue) {
|
||||
return;
|
||||
}
|
||||
setState(() {
|
||||
_adjustedValue++;
|
||||
});
|
||||
_onValueChanged(_adjustedValue);
|
||||
},
|
||||
onDecrement: () {
|
||||
if (_adjustedValue > widget.minValue) {
|
||||
return;
|
||||
}
|
||||
setState(() {
|
||||
_adjustedValue--;
|
||||
});
|
||||
_onValueChanged(_adjustedValue);
|
||||
}),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -31,7 +31,6 @@ class DevicesManagementApi {
|
||||
path: ApiEndpoints.getDeviceStatus.replaceAll('{uuid}', uuid),
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
print('json==$json');
|
||||
return DeviceStatus.fromJson(json);
|
||||
},
|
||||
);
|
||||
@ -55,7 +54,7 @@ class DevicesManagementApi {
|
||||
body: status.toMap(),
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
return true;
|
||||
return json['success'] ?? false;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
@ -64,6 +63,4 @@ class DevicesManagementApi {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -13,12 +13,10 @@ 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";
|
||||
@ -31,18 +29,15 @@ class Assets {
|
||||
static const String emptyTable = "assets/images/empty_table.svg";
|
||||
|
||||
// General assets
|
||||
static const String motionlessDetection =
|
||||
"assets/functions_icons/motionless_detection.svg";
|
||||
static const String motionlessDetection = "assets/functions_icons/motionless_detection.svg";
|
||||
static const String acHeating = "assets/functions_icons/ac_heating.svg";
|
||||
static const String acPowerOff = "assets/functions_icons/ac_power_off.svg";
|
||||
static const String acFanMiddle = "assets/functions_icons/ac_fan_middle.svg";
|
||||
static const String switchAlarmSound =
|
||||
"assets/functions_icons/switch_alarm_sound.svg";
|
||||
static const String switchAlarmSound = "assets/functions_icons/switch_alarm_sound.svg";
|
||||
static const String resetOff = "assets/functions_icons/reset_off.svg";
|
||||
static const String sensitivityOperationIcon =
|
||||
"assets/functions_icons/sesitivity_operation_icon.svg";
|
||||
static const String motionDetection =
|
||||
"assets/functions_icons/motion_detection.svg";
|
||||
static const String motionDetection = "assets/functions_icons/motion_detection.svg";
|
||||
static const String freezing = "assets/functions_icons/freezing.svg";
|
||||
static const String indicator = "assets/functions_icons/indicator.svg";
|
||||
static const String sceneRefresh = "assets/functions_icons/scene_refresh.svg";
|
||||
@ -51,23 +46,18 @@ class Assets {
|
||||
static const String fanSpeed = "assets/functions_icons/fan_speed.svg";
|
||||
static const String acFanLow = "assets/functions_icons/ac_fan_low.svg";
|
||||
static const String sensitivity = "assets/functions_icons/sensitivity.svg";
|
||||
static const String lightCountdown =
|
||||
"assets/functions_icons/light_countdown.svg";
|
||||
static const String lightCountdown = "assets/functions_icons/light_countdown.svg";
|
||||
static const String farDetection = "assets/functions_icons/far_detection.svg";
|
||||
static const String sceneChildUnlock =
|
||||
"assets/functions_icons/scene_child_unlock.svg";
|
||||
static const String sceneChildUnlock = "assets/functions_icons/scene_child_unlock.svg";
|
||||
static const String acFanAuto = "assets/functions_icons/ac_fan_auto.svg";
|
||||
static const String childLock = "assets/functions_icons/child_lock.svg";
|
||||
static const String factoryReset = "assets/functions_icons/factory_reset.svg";
|
||||
static const String acCooling = "assets/functions_icons/ac_cooling.svg";
|
||||
static const String sceneChildLock =
|
||||
"assets/functions_icons/scene_child_lock.svg";
|
||||
static const String celsiusDegrees =
|
||||
"assets/functions_icons/celsius_degrees.svg";
|
||||
static const String sceneChildLock = "assets/functions_icons/scene_child_lock.svg";
|
||||
static const String celsiusDegrees = "assets/functions_icons/celsius_degrees.svg";
|
||||
static const String masterState = "assets/functions_icons/master_state.svg";
|
||||
static const String acPower = "assets/functions_icons/ac_power.svg";
|
||||
static const String farDetectionFunction =
|
||||
"assets/functions_icons/far_detection_function.svg";
|
||||
static const String farDetectionFunction = "assets/functions_icons/far_detection_function.svg";
|
||||
static const String nobodyTime = "assets/functions_icons/nobody_time.svg";
|
||||
|
||||
// Automation functions
|
||||
@ -75,34 +65,26 @@ class Assets {
|
||||
"assets/functions_icons/automation_functions/temp_password_unlock.svg";
|
||||
static const String doorlockNormalOpen =
|
||||
"assets/functions_icons/automation_functions/doorlock_normal_open.svg";
|
||||
static const String doorbell =
|
||||
"assets/functions_icons/automation_functions/doorbell.svg";
|
||||
static const String doorbell = "assets/functions_icons/automation_functions/doorbell.svg";
|
||||
static const String remoteUnlockViaApp =
|
||||
"assets/functions_icons/automation_functions/remote_unlock_via_app.svg";
|
||||
static const String doubleLock =
|
||||
"assets/functions_icons/automation_functions/double_lock.svg";
|
||||
static const String doubleLock = "assets/functions_icons/automation_functions/double_lock.svg";
|
||||
static const String selfTestResult =
|
||||
"assets/functions_icons/automation_functions/self_test_result.svg";
|
||||
static const String lockAlarm =
|
||||
"assets/functions_icons/automation_functions/lock_alarm.svg";
|
||||
static const String lockAlarm = "assets/functions_icons/automation_functions/lock_alarm.svg";
|
||||
static const String presenceState =
|
||||
"assets/functions_icons/automation_functions/presence_state.svg";
|
||||
static const String currentTemp =
|
||||
"assets/functions_icons/automation_functions/current_temp.svg";
|
||||
static const String presence =
|
||||
"assets/functions_icons/automation_functions/presence.svg";
|
||||
static const String currentTemp = "assets/functions_icons/automation_functions/current_temp.svg";
|
||||
static const String presence = "assets/functions_icons/automation_functions/presence.svg";
|
||||
static const String residualElectricity =
|
||||
"assets/functions_icons/automation_functions/residual_electricity.svg";
|
||||
static const String hijackAlarm =
|
||||
"assets/functions_icons/automation_functions/hijack_alarm.svg";
|
||||
static const String hijackAlarm = "assets/functions_icons/automation_functions/hijack_alarm.svg";
|
||||
static const String passwordUnlock =
|
||||
"assets/functions_icons/automation_functions/password_unlock.svg";
|
||||
static const String remoteUnlockRequest =
|
||||
"assets/functions_icons/automation_functions/remote_unlock_req.svg";
|
||||
static const String cardUnlock =
|
||||
"assets/functions_icons/automation_functions/card_unlock.svg";
|
||||
static const String motion =
|
||||
"assets/functions_icons/automation_functions/motion.svg";
|
||||
static const String cardUnlock = "assets/functions_icons/automation_functions/card_unlock.svg";
|
||||
static const String motion = "assets/functions_icons/automation_functions/motion.svg";
|
||||
static const String fingerprintUnlock =
|
||||
"assets/functions_icons/automation_functions/fingerprint_unlock.svg";
|
||||
|
||||
@ -115,16 +97,13 @@ class Assets {
|
||||
"presence_sensor_assets/presence-sensor-assets/Distance.svg";
|
||||
static const String presenceIlluminanceValue =
|
||||
"presence_sensor_assets/presence-sensor-assets/Illuminance-Value.svg";
|
||||
static const String presenceEmpty =
|
||||
"presence_sensor_assets/presence-sensor-assets/Empty.svg";
|
||||
static const String presenceEmpty = "presence_sensor_assets/presence-sensor-assets/Empty.svg";
|
||||
static const String presenceIndicator =
|
||||
"presence_sensor_assets/presence-sensor-assets/Indicator.svg";
|
||||
static const String presenceTime =
|
||||
"presence_sensor_assets/presence-sensor-assets/Time.svg";
|
||||
static const String presenceTime = "presence_sensor_assets/presence-sensor-assets/Time.svg";
|
||||
static const String presenceSpaceTypeIcon =
|
||||
"presence_sensor_assets/presence-sensor-assets/space_type_icon.svg";
|
||||
static const String presenceRecord =
|
||||
"presence_sensor_assets/presence-sensor-assets/Record.svg";
|
||||
static const String presenceRecord = "presence_sensor_assets/presence-sensor-assets/Record.svg";
|
||||
static const String presenceHelpDescription =
|
||||
"presence_sensor_assets/presence-sensor-assets/help-description.svg";
|
||||
static const String presenceSensitivity =
|
||||
@ -133,10 +112,8 @@ class Assets {
|
||||
"presence_sensor_assets/presence-sensor-assets/parameter-settings.svg";
|
||||
static const String presenceInductionRecording =
|
||||
"presence_sensor_assets/presence-sensor-assets/induction-recording.svg";
|
||||
static const String presencePresence =
|
||||
"presence_sensor_assets/presence-sensor-assets/Presence.svg";
|
||||
static const String presenceMotion =
|
||||
"presence_sensor_assets/presence-sensor-assets/presence-sensor-motion.svg";
|
||||
static const String sensorPresence = "presence_sensor_assets/Presence.svg";
|
||||
static const String sensorMotion = "presence-sensor-assets/presence-sensor-motion.svg";
|
||||
|
||||
static const String lightPulp = "functions_icons/light_pulb.svg";
|
||||
|
||||
|
Reference in New Issue
Block a user