mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-17 02:25:16 +00:00
Implemented Acs functions and fixed design issue
This commit is contained in:
5
assets/icons/unlock_ic.svg
Normal file
5
assets/icons/unlock_ic.svg
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M15.0004 0C9.02035 0.00734375 4.17434 4.85328 4.16699 10.8334V17.5C4.16699 17.9602 4.54012 18.3334 5.00035 18.3334H8.33371C8.79395 18.3334 9.16707 17.9602 9.16707 17.5V10.8334C9.16699 7.61164 11.7787 5 15.0004 5C18.222 5 20.8337 7.61164 20.8337 10.8334V11.6666C20.8337 12.1269 21.2068 12.5 21.6671 12.5H25.0004C25.4606 12.5 25.8337 12.1269 25.8337 11.6666V10.8334C25.8264 4.85328 20.9804 0.00734375 15.0004 0Z" fill="#455A64"/>
|
||||||
|
<path d="M5.00014 16.6666H25.0001C27.3013 16.6666 29.1668 18.5321 29.1668 20.8333V35.8333C29.1668 38.1345 27.3013 40 25.0001 40H5.00014C2.69897 40 0.833496 38.1345 0.833496 35.8333V20.8333C0.833496 18.5321 2.69897 16.6666 5.00014 16.6666Z" fill="#2F66D3"/>
|
||||||
|
<path d="M19.1668 25.8333C19.1765 23.5321 17.3189 21.6588 15.0178 21.6491C12.7166 21.6394 10.8432 23.497 10.8335 25.7981C10.8268 27.3888 11.7263 28.8444 13.1518 29.5499L12.5085 34.0499C12.444 34.5056 12.7612 34.9273 13.2169 34.9917C13.2555 34.9972 13.2945 34.9999 13.3335 34.9999H16.6668C17.127 35.0046 17.5039 34.6353 17.5085 34.1751C17.5089 34.1327 17.5062 34.0903 17.5001 34.0483L16.8567 29.5483C18.2649 28.8436 19.1577 27.4078 19.1668 25.8333Z" fill="white"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
@ -10,12 +10,13 @@ import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
|||||||
class ACsBloc extends Bloc<AcsEvent, AcsState> {
|
class ACsBloc extends Bloc<AcsEvent, AcsState> {
|
||||||
final String acId;
|
final String acId;
|
||||||
late DeviceModel deviceModel;
|
late DeviceModel deviceModel;
|
||||||
|
late AcStatusModel deviceStatus;
|
||||||
|
|
||||||
ACsBloc({required this.acId}) : super(AcsInitialState()) {
|
ACsBloc({required this.acId}) : super(AcsInitialState()) {
|
||||||
on<AcsInitial>(_fetchAcsStatus);
|
on<AcsInitial>(_fetchAcsStatus);
|
||||||
on<IncreaseCoolToTemp>(_increaseCoolTo);
|
on<IncreaseCoolToTemp>(_increaseCoolTo);
|
||||||
on<DecreaseCoolToTemp>(_decreaseCoolTo);
|
on<DecreaseCoolToTemp>(_decreaseCoolTo);
|
||||||
on<SetCurrentTemp>(_setCurrentTemperature);
|
on<ChangeLock>(_changeLockValue);
|
||||||
on<ChangeAcMode>(_changeAcMode);
|
on<ChangeAcMode>(_changeAcMode);
|
||||||
on<ChangeFanSpeed>(_changeFanSpeed);
|
on<ChangeFanSpeed>(_changeFanSpeed);
|
||||||
}
|
}
|
||||||
@ -28,7 +29,7 @@ class ACsBloc extends Bloc<AcsEvent, AcsState> {
|
|||||||
for (var status in response['status']) {
|
for (var status in response['status']) {
|
||||||
statusModelList.add(StatusModel.fromJson(status));
|
statusModelList.add(StatusModel.fromJson(status));
|
||||||
}
|
}
|
||||||
AcStatusModel deviceStatus = AcStatusModel.fromJson(statusModelList);
|
deviceStatus = AcStatusModel.fromJson(statusModelList);
|
||||||
emit(GetAcStatusState(acStatusModel: deviceStatus));
|
emit(GetAcStatusState(acStatusModel: deviceStatus));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(AcsFailedState(error: e.toString()));
|
emit(AcsFailedState(error: e.toString()));
|
||||||
@ -36,82 +37,82 @@ class ACsBloc extends Bloc<AcsEvent, AcsState> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _setCurrentTemperature(SetCurrentTemp event, Emitter<AcsState> emit) async {
|
void _changeLockValue(ChangeLock event, Emitter<AcsState> emit) async {
|
||||||
emit(AcChangeTempLoading());
|
emit(AcChangeLoading(acStatusModel: deviceStatus));
|
||||||
int value = (event.value * 10).toInt();
|
|
||||||
final response = await DevicesAPI.controlDevice(
|
|
||||||
DeviceControlModel(deviceId: acId, code: 'temp_current', value: value), acId);
|
|
||||||
|
|
||||||
if (response['success'] ?? false) {
|
final lockValue = !event.lockBool;
|
||||||
// emit(AcIncreaseCoolTo(tempValue: tempValue));
|
try {
|
||||||
} else {
|
final response = await DevicesAPI.controlDevice(
|
||||||
emit(const AcsFailedState(error: 'Cannot change the device temperature'));
|
DeviceControlModel(deviceId: acId, code: 'child_lock', value: lockValue), acId);
|
||||||
// emit(AcIncreaseCoolTo(tempValue: event.value));
|
|
||||||
}
|
if (response['success'] ?? false) {
|
||||||
|
deviceStatus.childLock = lockValue;
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
emit(AcModifyingState(acStatusModel: deviceStatus));
|
||||||
}
|
}
|
||||||
|
|
||||||
void _increaseCoolTo(IncreaseCoolToTemp event, Emitter<AcsState> emit) async {
|
void _increaseCoolTo(IncreaseCoolToTemp event, Emitter<AcsState> emit) async {
|
||||||
emit(AcChangeTempLoading());
|
emit(AcChangeLoading(acStatusModel: deviceStatus));
|
||||||
|
|
||||||
double tempValue = event.value + 0.5;
|
double tempValue = event.value + 0.5;
|
||||||
int value = (tempValue * 10).toInt();
|
int value = (tempValue * 10).toInt();
|
||||||
final response = await DevicesAPI.controlDevice(
|
try {
|
||||||
DeviceControlModel(deviceId: acId, code: 'temp_set', value: value), acId);
|
final response = await DevicesAPI.controlDevice(
|
||||||
|
DeviceControlModel(deviceId: acId, code: 'temp_set', value: value), acId);
|
||||||
|
|
||||||
if (response['success'] ?? false) {
|
if (response['success'] ?? false) {
|
||||||
emit(AcIncreaseCoolTo(tempValue: tempValue));
|
deviceStatus.tempSet = value;
|
||||||
} else {
|
}
|
||||||
emit(const AcsFailedState(error: 'Cannot change the device temperature'));
|
} catch (_) {}
|
||||||
emit(AcIncreaseCoolTo(tempValue: event.value));
|
emit(AcModifyingState(acStatusModel: deviceStatus));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _decreaseCoolTo(DecreaseCoolToTemp event, Emitter<AcsState> emit) async {
|
void _decreaseCoolTo(DecreaseCoolToTemp event, Emitter<AcsState> emit) async {
|
||||||
emit(AcChangeTempLoading());
|
emit(AcChangeLoading(acStatusModel: deviceStatus));
|
||||||
|
|
||||||
double tempValue = event.value - 0.5;
|
double tempValue = event.value - 0.5;
|
||||||
int value = (tempValue * 10).toInt();
|
int value = (tempValue * 10).toInt();
|
||||||
final response = await DevicesAPI.controlDevice(
|
try {
|
||||||
DeviceControlModel(deviceId: acId, code: 'temp_set', value: value), acId);
|
final response = await DevicesAPI.controlDevice(
|
||||||
|
DeviceControlModel(deviceId: acId, code: 'temp_set', value: value), acId);
|
||||||
|
|
||||||
if (response['success'] ?? false) {
|
if (response['success'] ?? false) {
|
||||||
emit(AcDecreaseCoolTo(tempValue: tempValue));
|
deviceStatus.tempSet = value;
|
||||||
} else {
|
}
|
||||||
emit(const AcsFailedState(error: 'Cannot change the device temperature'));
|
} catch (_) {}
|
||||||
emit(AcDecreaseCoolTo(tempValue: event.value));
|
emit(AcModifyingState(acStatusModel: deviceStatus));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _changeAcMode(ChangeAcMode event, Emitter<AcsState> emit) async {
|
void _changeAcMode(ChangeAcMode event, Emitter<AcsState> emit) async {
|
||||||
emit(AcChangeTempLoading());
|
emit(AcChangeLoading(acStatusModel: deviceStatus));
|
||||||
|
|
||||||
final tempMode = tempModesMap[getNextItem(tempModesMap, event.tempModes)]!;
|
final tempMode = tempModesMap[getNextItem(tempModesMap, event.tempModes)]!;
|
||||||
|
try {
|
||||||
|
final response = await DevicesAPI.controlDevice(
|
||||||
|
DeviceControlModel(deviceId: acId, code: 'mode', value: getACModeString(tempMode)), acId);
|
||||||
|
|
||||||
final response = await DevicesAPI.controlDevice(
|
if (response['success'] ?? false) {
|
||||||
DeviceControlModel(deviceId: acId, code: 'mode', value: getACModeString(tempMode)), acId);
|
deviceStatus.modeString = getACModeString(tempMode);
|
||||||
|
deviceStatus.acMode = AcStatusModel.getACMode(getACModeString(tempMode));
|
||||||
if (response['success'] ?? false) {
|
}
|
||||||
emit(AcModeState(tempModes: tempMode));
|
} catch (_) {}
|
||||||
} else {
|
emit(AcModifyingState(acStatusModel: deviceStatus));
|
||||||
emit(const AcsFailedState(error: 'Cannot change the device temperature'));
|
|
||||||
// emit(AcDecreaseCoolTo(tempValue: event.value));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _changeFanSpeed(ChangeFanSpeed event, Emitter<AcsState> emit) async {
|
void _changeFanSpeed(ChangeFanSpeed event, Emitter<AcsState> emit) async {
|
||||||
emit(AcChangeTempLoading());
|
emit(AcChangeLoading(acStatusModel: deviceStatus));
|
||||||
|
|
||||||
final fanSpeed = event.fanSpeeds;
|
final fanSpeed = event.fanSpeeds;
|
||||||
final response = await DevicesAPI.controlDevice(
|
final response = await DevicesAPI.controlDevice(
|
||||||
DeviceControlModel(deviceId: acId, code: 'level', value: getNextFanSpeedKey(fanSpeed)),
|
DeviceControlModel(deviceId: acId, code: 'level', value: getNextFanSpeedKey(fanSpeed)),
|
||||||
acId);
|
acId);
|
||||||
|
|
||||||
if (response['success'] ?? false) {
|
try {
|
||||||
emit(FanSpeedState(fanSpeeds: fanSpeed));
|
if (response['success'] ?? false) {
|
||||||
} else {
|
deviceStatus.fanSpeedsString = getNextFanSpeedKey(fanSpeed);
|
||||||
emit(const AcsFailedState(error: 'Cannot change the device temperature'));
|
deviceStatus.acFanSpeed = AcStatusModel.getFanSpeed(getNextFanSpeedKey(fanSpeed));
|
||||||
// emit(AcDecreaseCoolTo(tempValue: event.value));
|
}
|
||||||
}
|
} catch (_) {}
|
||||||
|
emit(AcModifyingState(acStatusModel: deviceStatus));
|
||||||
}
|
}
|
||||||
|
|
||||||
String getACModeString(TempModes value) {
|
String getACModeString(TempModes value) {
|
||||||
|
@ -30,14 +30,6 @@ class DecreaseCoolToTemp extends AcsEvent {
|
|||||||
List<Object> get props => [value];
|
List<Object> get props => [value];
|
||||||
}
|
}
|
||||||
|
|
||||||
class SetCurrentTemp extends AcsEvent {
|
|
||||||
final double value;
|
|
||||||
const SetCurrentTemp({required this.value});
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<Object> get props => [value];
|
|
||||||
}
|
|
||||||
|
|
||||||
class ChangeAcMode extends AcsEvent {
|
class ChangeAcMode extends AcsEvent {
|
||||||
final TempModes tempModes;
|
final TempModes tempModes;
|
||||||
const ChangeAcMode({required this.tempModes});
|
const ChangeAcMode({required this.tempModes});
|
||||||
@ -53,3 +45,11 @@ class ChangeFanSpeed extends AcsEvent {
|
|||||||
@override
|
@override
|
||||||
List<Object> get props => [fanSpeeds];
|
List<Object> get props => [fanSpeeds];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ChangeLock extends AcsEvent {
|
||||||
|
final bool lockBool;
|
||||||
|
const ChangeLock({required this.lockBool});
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [lockBool];
|
||||||
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:syncrow_app/features/devices/model/status_model.dart';
|
import 'package:syncrow_app/features/devices/model/status_model.dart';
|
||||||
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
|
||||||
|
|
||||||
abstract class AcsState extends Equatable {
|
abstract class AcsState extends Equatable {
|
||||||
const AcsState();
|
const AcsState();
|
||||||
@ -13,30 +12,20 @@ class AcsInitialState extends AcsState {}
|
|||||||
|
|
||||||
class AcsLoadingState extends AcsState {}
|
class AcsLoadingState extends AcsState {}
|
||||||
|
|
||||||
class AcChangeTempLoading extends AcsState {}
|
class AcChangeLoading extends AcsState {
|
||||||
|
final AcStatusModel acStatusModel;
|
||||||
class AcChangeCurrentTempState extends AcsState {
|
const AcChangeLoading({required this.acStatusModel});
|
||||||
final double currentValue;
|
|
||||||
const AcChangeCurrentTempState({required this.currentValue});
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Object> get props => [currentValue];
|
List<Object> get props => [acStatusModel];
|
||||||
}
|
}
|
||||||
|
|
||||||
class AcIncreaseCoolTo extends AcsState {
|
class AcModifyingState extends AcsState {
|
||||||
final double tempValue;
|
final AcStatusModel acStatusModel;
|
||||||
const AcIncreaseCoolTo({required this.tempValue});
|
const AcModifyingState({required this.acStatusModel});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Object> get props => [tempValue];
|
List<Object> get props => [acStatusModel];
|
||||||
}
|
|
||||||
|
|
||||||
class AcDecreaseCoolTo extends AcsState {
|
|
||||||
final double tempValue;
|
|
||||||
const AcDecreaseCoolTo({required this.tempValue});
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<Object> get props => [tempValue];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class GetAcStatusState extends AcsState {
|
class GetAcStatusState extends AcsState {
|
||||||
@ -47,24 +36,9 @@ class GetAcStatusState extends AcsState {
|
|||||||
List<Object> get props => [acStatusModel];
|
List<Object> get props => [acStatusModel];
|
||||||
}
|
}
|
||||||
|
|
||||||
class AcModeState extends AcsState {
|
|
||||||
final TempModes tempModes;
|
|
||||||
const AcModeState({required this.tempModes});
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<Object> get props => [tempModes];
|
|
||||||
}
|
|
||||||
|
|
||||||
class FanSpeedState extends AcsState {
|
|
||||||
final FanSpeeds fanSpeeds;
|
|
||||||
const FanSpeedState({required this.fanSpeeds});
|
|
||||||
|
|
||||||
@override
|
|
||||||
List<Object> get props => [fanSpeeds];
|
|
||||||
}
|
|
||||||
|
|
||||||
class AcsFailedState extends AcsState {
|
class AcsFailedState extends AcsState {
|
||||||
final String error;
|
final String error;
|
||||||
|
|
||||||
const AcsFailedState({required this.error});
|
const AcsFailedState({required this.error});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -52,7 +52,7 @@ class AcStatusModel {
|
|||||||
childLock: _childLock);
|
childLock: _childLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
TempModes getACMode(String value) {
|
static TempModes getACMode(String value) {
|
||||||
if (value == 'cold') {
|
if (value == 'cold') {
|
||||||
return TempModes.cold;
|
return TempModes.cold;
|
||||||
} else if (value == 'hot') {
|
} else if (value == 'hot') {
|
||||||
@ -64,7 +64,7 @@ class AcStatusModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FanSpeeds getFanSpeed(String value) {
|
static FanSpeeds getFanSpeed(String value) {
|
||||||
if (value == 'low') {
|
if (value == 'low') {
|
||||||
return FanSpeeds.low;
|
return FanSpeeds.low;
|
||||||
} else if (value == 'middle') {
|
} else if (value == 'middle') {
|
||||||
|
@ -1,17 +1,12 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_state.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_state.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
|
||||||
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
||||||
import 'package:syncrow_app/features/devices/view/widgets/ACs/ac_interface_controls.dart';
|
import 'package:syncrow_app/features/devices/view/widgets/ACs/ac_interface_controls.dart';
|
||||||
import 'package:syncrow_app/features/devices/view/widgets/ACs/ac_interface_temp_unit.dart';
|
import 'package:syncrow_app/features/devices/view/widgets/ACs/ac_interface_temp_unit.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
|
||||||
import 'package:syncrow_app/generated/assets.dart';
|
import 'package:syncrow_app/generated/assets.dart';
|
||||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
|
||||||
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
||||||
import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
|
|
||||||
|
|
||||||
class AcInterface extends StatelessWidget {
|
class AcInterface extends StatelessWidget {
|
||||||
const AcInterface({super.key, required this.ac});
|
const AcInterface({super.key, required this.ac});
|
||||||
@ -49,37 +44,30 @@ class AcInterface extends StatelessWidget {
|
|||||||
opacity: 0.4,
|
opacity: 0.4,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: SingleChildScrollView(
|
||||||
padding: EdgeInsets.only(
|
child: Column(
|
||||||
top: Constants.appBarHeight,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
left: Constants.defaultPadding,
|
children: [
|
||||||
right: Constants.defaultPadding,
|
ConstrainedBox(
|
||||||
),
|
constraints: const BoxConstraints(
|
||||||
child: SingleChildScrollView(
|
maxHeight: 380,
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
||||||
children: [
|
|
||||||
ConstrainedBox(
|
|
||||||
constraints: const BoxConstraints(
|
|
||||||
maxHeight: 380,
|
|
||||||
),
|
|
||||||
child: AcInterfaceTempUnit(
|
|
||||||
acDevice: ac,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(
|
child: AcInterfaceTempUnit(
|
||||||
height: 10,
|
acDevice: ac,
|
||||||
),
|
),
|
||||||
ConstrainedBox(
|
),
|
||||||
constraints: const BoxConstraints(
|
const SizedBox(
|
||||||
maxHeight: 130,
|
height: 10,
|
||||||
),
|
),
|
||||||
child: AcInterfaceControls(
|
ConstrainedBox(
|
||||||
deviceModel: ac,
|
constraints: const BoxConstraints(
|
||||||
),
|
maxHeight: 130,
|
||||||
),
|
),
|
||||||
],
|
child: AcInterfaceControls(
|
||||||
),
|
deviceModel: ac,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
||||||
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_events.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_state.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_state.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
|
||||||
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
||||||
import 'package:syncrow_app/features/devices/view/widgets/ACs/ac_mode_control_unit.dart';
|
import 'package:syncrow_app/features/devices/view/widgets/ACs/ac_mode_control_unit.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||||
@ -21,6 +21,25 @@ class AcInterfaceControls extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocBuilder<ACsBloc, AcsState>(
|
return BlocBuilder<ACsBloc, AcsState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
|
String lockIconName = Assets.assetsIconsLock;
|
||||||
|
bool lockValue = false;
|
||||||
|
|
||||||
|
if (state is GetAcStatusState) {
|
||||||
|
lockIconName =
|
||||||
|
state.acStatusModel.childLock ? Assets.assetsIconsLock : Assets.assetsIconsUnLock;
|
||||||
|
lockValue = state.acStatusModel.childLock;
|
||||||
|
}
|
||||||
|
if (state is AcChangeLoading) {
|
||||||
|
lockIconName =
|
||||||
|
state.acStatusModel.childLock ? Assets.assetsIconsLock : Assets.assetsIconsUnLock;
|
||||||
|
lockValue = state.acStatusModel.childLock;
|
||||||
|
}
|
||||||
|
if (state is AcModifyingState) {
|
||||||
|
lockIconName =
|
||||||
|
state.acStatusModel.childLock ? Assets.assetsIconsLock : Assets.assetsIconsUnLock;
|
||||||
|
lockValue = state.acStatusModel.childLock;
|
||||||
|
}
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
ACModeControlUnit(acDevice: deviceModel),
|
ACModeControlUnit(acDevice: deviceModel),
|
||||||
@ -28,7 +47,7 @@ class AcInterfaceControls extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
child: InkWell(
|
child: GestureDetector(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
child: DefaultContainer(
|
child: DefaultContainer(
|
||||||
height: 55,
|
height: 55,
|
||||||
@ -40,12 +59,14 @@ class AcInterfaceControls extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: InkWell(
|
child: GestureDetector(
|
||||||
onTap: () {},
|
onTap: () {
|
||||||
|
BlocProvider.of<ACsBloc>(context).add(ChangeLock(lockBool: lockValue));
|
||||||
|
},
|
||||||
child: DefaultContainer(
|
child: DefaultContainer(
|
||||||
height: 55,
|
height: 55,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: SvgPicture.asset(Assets.assetsIconsLock),
|
child: SvgPicture.asset(lockIconName),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -5,7 +5,6 @@ import 'package:sleek_circular_slider/sleek_circular_slider.dart';
|
|||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_events.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_events.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_state.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_state.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
|
||||||
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||||
@ -27,7 +26,6 @@ class AcInterfaceTempUnit extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocBuilder<ACsBloc, AcsState>(
|
return BlocBuilder<ACsBloc, AcsState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
// double setToTemp = 250;
|
|
||||||
return DefaultContainer(
|
return DefaultContainer(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -54,8 +52,14 @@ class AcInterfaceTempUnit extends StatelessWidget {
|
|||||||
fontWeight: FontsManager.regular,
|
fontWeight: FontsManager.regular,
|
||||||
),
|
),
|
||||||
modifier: (double value) {
|
modifier: (double value) {
|
||||||
// return '${DeviceModel.temperature.toStringAsFixed(1)}°C';
|
double temp = state is GetAcStatusState
|
||||||
return '${value.toStringAsFixed(1)}°C';
|
? state.acStatusModel.currentTemp / 10
|
||||||
|
: state is AcModifyingState
|
||||||
|
? state.acStatusModel.currentTemp / 10
|
||||||
|
: state is AcChangeLoading
|
||||||
|
? state.acStatusModel.currentTemp / 10
|
||||||
|
: 25;
|
||||||
|
return '$temp°C';
|
||||||
},
|
},
|
||||||
mainLabelStyle: context.titleLarge.copyWith(
|
mainLabelStyle: context.titleLarge.copyWith(
|
||||||
height: 0,
|
height: 0,
|
||||||
@ -72,24 +76,15 @@ class AcInterfaceTempUnit extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// min: DeviceModel.bounds.min,
|
|
||||||
// max: DeviceModel.bounds.max,
|
|
||||||
min: 20,
|
min: 20,
|
||||||
max: 30,
|
max: 30,
|
||||||
initialValue:
|
initialValue: state is GetAcStatusState
|
||||||
state is GetAcStatusState ? state.acStatusModel.currentTemp / 10 : 25,
|
? state.acStatusModel.tempSet / 10
|
||||||
onChange: (value) async {
|
: state is AcModifyingState
|
||||||
await Future.delayed(const Duration(seconds: 2));
|
? state.acStatusModel.tempSet / 10
|
||||||
// String valueAsString = value.toStringAsFixed(1);
|
: state is AcChangeLoading
|
||||||
// if (valueAsString.endsWith(".0") || valueAsString.endsWith(".5")) {
|
? state.acStatusModel.tempSet / 10
|
||||||
// value = double.parse(valueAsString);
|
: 25,
|
||||||
BlocProvider.of<ACsBloc>(context).add(SetCurrentTemp(value: value));
|
|
||||||
// await DevicesCubit.getInstance().deviceControl(
|
|
||||||
// DeviceControlModel(
|
|
||||||
// deviceId: acDevice.uuid, code: 'temp_set', value: value * 10),
|
|
||||||
// acDevice.uuid!);
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -102,37 +97,21 @@ class AcInterfaceTempUnit extends StatelessWidget {
|
|||||||
dimension: 24,
|
dimension: 24,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (state is AcChangeTempLoading) {
|
if (state is AcChangeLoading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
double tempValue = 0;
|
double tempValue = 0;
|
||||||
if (state is AcIncreaseCoolTo) {
|
if (state is AcModifyingState) {
|
||||||
tempValue = state.tempValue;
|
tempValue = state.acStatusModel.tempSet / 10;
|
||||||
} else if (state is GetAcStatusState) {
|
} else if (state is GetAcStatusState) {
|
||||||
tempValue = state.acStatusModel.tempSet / 10;
|
tempValue = state.acStatusModel.tempSet / 10;
|
||||||
} else if (state is AcDecreaseCoolTo) {
|
|
||||||
tempValue = state.tempValue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tempValue > 20) {
|
if (tempValue > 20) {
|
||||||
BlocProvider.of<ACsBloc>(context)
|
BlocProvider.of<ACsBloc>(context)
|
||||||
.add(DecreaseCoolToTemp(value: tempValue));
|
.add(DecreaseCoolToTemp(value: tempValue));
|
||||||
}
|
}
|
||||||
//TODO refactor the loading check
|
|
||||||
// if (state is AcsLoadingState ||
|
|
||||||
// state is DeviceControlSuccess ||
|
|
||||||
// state is DeviceControlLoading) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// if (setToTemp > 20) {
|
|
||||||
// DevicesCubit.getInstance().deviceControl(
|
|
||||||
// DeviceControlModel(
|
|
||||||
// deviceId: acDevice.uuid,
|
|
||||||
// code: 'temp_set',
|
|
||||||
// value: (setToTemp - 0.5) * 10),
|
|
||||||
// acDevice.uuid!);
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
child: SvgPicture.asset(
|
child: SvgPicture.asset(
|
||||||
Assets.assetsIconsMinus,
|
Assets.assetsIconsMinus,
|
||||||
@ -143,11 +122,11 @@ class AcInterfaceTempUnit extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
BodyLarge(
|
BodyLarge(
|
||||||
// text: "${DeviceModel.coolTo}° C",
|
// text: "${DeviceModel.coolTo}° C",
|
||||||
text: state is AcIncreaseCoolTo
|
text: state is GetAcStatusState
|
||||||
? '${state.tempValue}° C'
|
? '${state.acStatusModel.tempSet / 10}° C'
|
||||||
: state is AcDecreaseCoolTo
|
: state is AcModifyingState
|
||||||
? '${state.tempValue}° C'
|
? '${state.acStatusModel.tempSet / 10}° C'
|
||||||
: state is GetAcStatusState
|
: state is AcChangeLoading
|
||||||
? '${state.acStatusModel.tempSet / 10}° C'
|
? '${state.acStatusModel.tempSet / 10}° C'
|
||||||
: '',
|
: '',
|
||||||
style: context.bodyLarge.copyWith(
|
style: context.bodyLarge.copyWith(
|
||||||
@ -168,36 +147,22 @@ class AcInterfaceTempUnit extends StatelessWidget {
|
|||||||
dimension: 24,
|
dimension: 24,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (state is AcChangeTempLoading) {
|
if (state is AcChangeLoading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
double tempValue = 0;
|
double tempValue = 0;
|
||||||
if (state is AcIncreaseCoolTo) {
|
if (state is AcModifyingState) {
|
||||||
tempValue = state.tempValue;
|
tempValue = state.acStatusModel.tempSet / 10;
|
||||||
} else if (state is GetAcStatusState) {
|
} else if (state is GetAcStatusState) {
|
||||||
tempValue = state.acStatusModel.tempSet / 10;
|
tempValue = state.acStatusModel.tempSet / 10;
|
||||||
} else if (state is AcDecreaseCoolTo) {
|
} else if (state is AcChangeLoading) {
|
||||||
tempValue = state.tempValue;
|
tempValue = state.acStatusModel.tempSet / 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tempValue < 30) {
|
if (tempValue < 30) {
|
||||||
BlocProvider.of<ACsBloc>(context)
|
BlocProvider.of<ACsBloc>(context)
|
||||||
.add(IncreaseCoolToTemp(value: tempValue));
|
.add(IncreaseCoolToTemp(value: tempValue));
|
||||||
}
|
}
|
||||||
// if (state is GetDeviceStatusLoading ||
|
|
||||||
// state is DeviceControlSuccess ||
|
|
||||||
// state is DeviceControlLoading) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// if (setToTemp < 30) {
|
|
||||||
// DevicesCubit.getInstance().deviceControl(
|
|
||||||
// DeviceControlModel(
|
|
||||||
// deviceId: acDevice.uuid,
|
|
||||||
// code: 'temp_set',
|
|
||||||
// value: (setToTemp + 0.5) * 10),
|
|
||||||
// acDevice.uuid!);
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
child: SvgPicture.asset(
|
child: SvgPicture.asset(
|
||||||
Assets.assetsIconsPlus,
|
Assets.assetsIconsPlus,
|
||||||
|
@ -4,8 +4,6 @@ import 'package:flutter_svg/flutter_svg.dart';
|
|||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_events.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_events.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_state.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_state.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
|
||||||
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
|
|
||||||
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||||
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
||||||
@ -27,63 +25,52 @@ class ACModeControlUnit extends StatelessWidget {
|
|||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Flexible(
|
Flexible(
|
||||||
child: InkWell(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// print(
|
|
||||||
// '\n\ncurrentFanSpeed:$fanSpeed \nchanged to:\t${fanSpeedsMap[getNextFanSpeedKey(fanSpeed)]!}\nKey:\t\t\"${reversedFanSpeedsMap[fanSpeedsMap[getNextFanSpeedKey(fanSpeed)]!]!}\"');
|
|
||||||
if (state is GetAcStatusState) {
|
if (state is GetAcStatusState) {
|
||||||
BlocProvider.of<ACsBloc>(context)
|
BlocProvider.of<ACsBloc>(context)
|
||||||
.add(ChangeFanSpeed(fanSpeeds: state.acStatusModel.acFanSpeed));
|
.add(ChangeFanSpeed(fanSpeeds: state.acStatusModel.acFanSpeed));
|
||||||
} else if (state is FanSpeedState) {
|
} else if (state is AcModifyingState) {
|
||||||
BlocProvider.of<ACsBloc>(context)
|
BlocProvider.of<ACsBloc>(context)
|
||||||
.add(ChangeFanSpeed(fanSpeeds: state.fanSpeeds));
|
.add(ChangeFanSpeed(fanSpeeds: state.acStatusModel.acFanSpeed));
|
||||||
}
|
}
|
||||||
|
|
||||||
// DevicesCubit.getInstance().deviceControl(
|
|
||||||
// DeviceControlModel(
|
|
||||||
// deviceId: acDevice.uuid,
|
|
||||||
// code: 'level',
|
|
||||||
// value: reversedFanSpeedsMap[fanSpeed]!),
|
|
||||||
// acDevice.uuid!);
|
|
||||||
},
|
},
|
||||||
child: DefaultContainer(
|
child: DefaultContainer(
|
||||||
height: 55,
|
height: 55,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: state is GetAcStatusState
|
child: state is GetAcStatusState
|
||||||
? SvgPicture.asset(fanSpeedsIconMap[state.acStatusModel.acFanSpeed]!)
|
? SvgPicture.asset(fanSpeedsIconMap[state.acStatusModel.acFanSpeed]!)
|
||||||
: state is FanSpeedState
|
: state is AcModifyingState
|
||||||
? SvgPicture.asset(fanSpeedsIconMap[state.fanSpeeds]!)
|
? SvgPicture.asset(fanSpeedsIconMap[state.acStatusModel.acFanSpeed]!)
|
||||||
: const CircularProgressIndicator()),
|
: state is AcChangeLoading
|
||||||
|
? SvgPicture.asset(
|
||||||
|
fanSpeedsIconMap[state.acStatusModel.acFanSpeed]!)
|
||||||
|
: const CircularProgressIndicator()),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: InkWell(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (state is GetAcStatusState) {
|
if (state is GetAcStatusState) {
|
||||||
BlocProvider.of<ACsBloc>(context)
|
BlocProvider.of<ACsBloc>(context)
|
||||||
.add(ChangeAcMode(tempModes: state.acStatusModel.acMode));
|
.add(ChangeAcMode(tempModes: state.acStatusModel.acMode));
|
||||||
} else if (state is FanSpeedState) {
|
} else if (state is AcModifyingState) {
|
||||||
BlocProvider.of<ACsBloc>(context)
|
BlocProvider.of<ACsBloc>(context)
|
||||||
.add(ChangeFanSpeed(fanSpeeds: state.fanSpeeds));
|
.add(ChangeAcMode(tempModes: state.acStatusModel.acMode));
|
||||||
}
|
}
|
||||||
// tempMode = tempModesMap[getNextItem(tempModesMap, tempMode)]!;
|
|
||||||
// DevicesCubit.getInstance().deviceControl(
|
|
||||||
// DeviceControlModel(
|
|
||||||
// deviceId: acDevice.uuid,
|
|
||||||
// code: 'mode',
|
|
||||||
// value: reversedTempModesMap[tempMode]!),
|
|
||||||
// acDevice.uuid!);
|
|
||||||
},
|
},
|
||||||
child: DefaultContainer(
|
child: DefaultContainer(
|
||||||
height: 55,
|
height: 55,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: state is GetAcStatusState
|
child: state is GetAcStatusState
|
||||||
? SvgPicture.asset(tempModesIconMap[state.acStatusModel.acMode]!)
|
? SvgPicture.asset(tempModesIconMap[state.acStatusModel.acMode]!)
|
||||||
: state is AcModeState
|
: state is AcModifyingState
|
||||||
? SvgPicture.asset(tempModesIconMap[state.tempModes]!)
|
? SvgPicture.asset(tempModesIconMap[state.acStatusModel.acMode]!)
|
||||||
: const CircularProgressIndicator(),
|
: state is AcChangeLoading
|
||||||
|
? SvgPicture.asset(tempModesIconMap[state.acStatusModel.acMode]!)
|
||||||
|
: const CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -3,13 +3,11 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
|||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_state.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_state.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
|
||||||
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||||
import 'package:syncrow_app/utils/context_extension.dart';
|
import 'package:syncrow_app/utils/context_extension.dart';
|
||||||
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
||||||
|
|
||||||
import 'package:syncrow_app/generated/assets.dart';
|
import 'package:syncrow_app/generated/assets.dart';
|
||||||
|
|
||||||
class ACTempWidget extends StatelessWidget {
|
class ACTempWidget extends StatelessWidget {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_events.dart';
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_events.dart';
|
||||||
@ -28,46 +27,40 @@ class ACsView extends StatelessWidget {
|
|||||||
// if (DevicesCubit.getInstance().getSelectedDevice() is DeviceModel) {
|
// if (DevicesCubit.getInstance().getSelectedDevice() is DeviceModel) {
|
||||||
// selectedAC = DevicesCubit.getInstance().getSelectedDevice() as DeviceModel;
|
// selectedAC = DevicesCubit.getInstance().getSelectedDevice() as DeviceModel;
|
||||||
// }
|
// }
|
||||||
return AnnotatedRegion(
|
return Scaffold(
|
||||||
value: SystemUiOverlayStyle(
|
backgroundColor: ColorsManager.backgroundColor,
|
||||||
statusBarColor: ColorsManager.primaryColor.withOpacity(0.5),
|
// extendBodyBehindAppBar: true,
|
||||||
statusBarIconBrightness: Brightness.light,
|
// extendBody: true,
|
||||||
|
appBar: CategoryViewAppBar(
|
||||||
|
title: deviceModel?.name ?? '',
|
||||||
),
|
),
|
||||||
child: SafeArea(
|
body: SafeArea(
|
||||||
child: Scaffold(
|
child: Container(
|
||||||
backgroundColor: ColorsManager.backgroundColor,
|
width: MediaQuery.sizeOf(context).width,
|
||||||
extendBodyBehindAppBar: true,
|
height: MediaQuery.sizeOf(context).height,
|
||||||
extendBody: true,
|
decoration: const BoxDecoration(
|
||||||
appBar: CategoryViewAppBar(
|
image: DecorationImage(
|
||||||
title: deviceModel?.name ?? '',
|
image: AssetImage(
|
||||||
|
Assets.assetsImagesBackground,
|
||||||
|
),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
opacity: 0.4,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
body: Container(
|
child: Padding(
|
||||||
width: MediaQuery.sizeOf(context).width,
|
padding: const EdgeInsets.only(
|
||||||
height: MediaQuery.sizeOf(context).height,
|
top: Constants.defaultPadding,
|
||||||
decoration: const BoxDecoration(
|
left: Constants.defaultPadding,
|
||||||
image: DecorationImage(
|
right: Constants.defaultPadding,
|
||||||
image: AssetImage(
|
|
||||||
Assets.assetsImagesBackground,
|
|
||||||
),
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
opacity: 0.4,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: Constants.appBarHeight,
|
|
||||||
left: Constants.defaultPadding,
|
|
||||||
right: Constants.defaultPadding,
|
|
||||||
),
|
|
||||||
child: state is AcsLoadingState
|
|
||||||
? const Center(
|
|
||||||
child: DefaultContainer(
|
|
||||||
width: 50, height: 50, child: CircularProgressIndicator()),
|
|
||||||
)
|
|
||||||
: SizedBox.expand(
|
|
||||||
child: deviceModel != null ? AcInterface(ac: deviceModel!) : ACsList(),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
child: state is AcsLoadingState
|
||||||
|
? const Center(
|
||||||
|
child: DefaultContainer(
|
||||||
|
width: 50, height: 50, child: CircularProgressIndicator()),
|
||||||
|
)
|
||||||
|
: SizedBox.expand(
|
||||||
|
child: deviceModel != null ? AcInterface(ac: deviceModel!) : ACsList(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
/// This widget displays the icon and name of the device, along with a switch
|
/// This widget displays the icon and name of the device, along with a switch
|
||||||
/// to control its state. Tapping on the widget opens the device interface.
|
/// to control its state. Tapping on the widget opens the device interface.
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
||||||
@ -16,6 +17,7 @@ import 'package:syncrow_app/features/devices/view/widgets/three_gang/three_gang_
|
|||||||
import 'package:syncrow_app/features/shared_widgets/custom_switch.dart';
|
import 'package:syncrow_app/features/shared_widgets/custom_switch.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
||||||
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
||||||
|
import 'package:syncrow_app/navigation/navigation_service.dart';
|
||||||
import 'package:syncrow_app/utils/context_extension.dart';
|
import 'package:syncrow_app/utils/context_extension.dart';
|
||||||
import 'package:syncrow_app/utils/helpers/custom_page_route.dart';
|
import 'package:syncrow_app/utils/helpers/custom_page_route.dart';
|
||||||
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
import 'package:syncrow_app/utils/resource_manager/constants.dart';
|
||||||
@ -82,7 +84,11 @@ class RoomPageSwitch extends StatelessWidget {
|
|||||||
void showDeviceInterface(DeviceModel device, BuildContext context) {
|
void showDeviceInterface(DeviceModel device, BuildContext context) {
|
||||||
switch (device.productType) {
|
switch (device.productType) {
|
||||||
case DeviceType.AC:
|
case DeviceType.AC:
|
||||||
navigateToInterface(ACsView(deviceModel: device), context);
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
PageRouteBuilder(
|
||||||
|
pageBuilder: (context, animation1, animation2) => ACsView(deviceModel: device)));
|
||||||
|
// navigateToInterface(ACsView(deviceModel: device), context);
|
||||||
break;
|
break;
|
||||||
case DeviceType.WallSensor:
|
case DeviceType.WallSensor:
|
||||||
navigateToInterface(WallMountedInterface(wallSensor: device), context);
|
navigateToInterface(WallMountedInterface(wallSensor: device), context);
|
||||||
|
@ -3,8 +3,7 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsFontsAftikaRegular
|
/// Assets for assetsFontsAftikaRegular
|
||||||
/// assets/fonts/AftikaRegular.ttf
|
/// assets/fonts/AftikaRegular.ttf
|
||||||
static const String assetsFontsAftikaRegular =
|
static const String assetsFontsAftikaRegular = "assets/fonts/AftikaRegular.ttf";
|
||||||
"assets/fonts/AftikaRegular.ttf";
|
|
||||||
|
|
||||||
/// Assets for assetsIcons3GangSwitch
|
/// Assets for assetsIcons3GangSwitch
|
||||||
/// assets/icons/3GangSwitch.svg
|
/// assets/icons/3GangSwitch.svg
|
||||||
@ -20,97 +19,81 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsIconsAutomatedClock
|
/// Assets for assetsIconsAutomatedClock
|
||||||
/// assets/icons/automated_clock.svg
|
/// assets/icons/automated_clock.svg
|
||||||
static const String assetsIconsAutomatedClock =
|
static const String assetsIconsAutomatedClock = "assets/icons/automated_clock.svg";
|
||||||
"assets/icons/automated_clock.svg";
|
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstChargeddmOff
|
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstChargeddmOff
|
||||||
/// assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstChargeddmOff.svg
|
/// assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstChargeddmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstChargeddmOff =
|
||||||
assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstChargeddmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstChargeddmOff.svg";
|
"assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstChargeddmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstDefaultdmOff
|
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstDefaultdmOff
|
||||||
/// assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstDefaultdmOff.svg
|
/// assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstDefaultdmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstDefaultdmOff =
|
||||||
assetsIconsBatteryDmOffPerOffchargOfflowOffpmOffstDefaultdmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstDefaultdmOff.svg";
|
"assets/icons/battery/dmOff/perOffchargOfflowOffpmOffstDefaultdmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOffpmOnstChargeddmOff
|
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOffpmOnstChargeddmOff
|
||||||
/// assets/icons/battery/dmOff/perOffchargOfflowOffpmOnstChargeddmOff.svg
|
/// assets/icons/battery/dmOff/perOffchargOfflowOffpmOnstChargeddmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOffchargOfflowOffpmOnstChargeddmOff =
|
||||||
assetsIconsBatteryDmOffPerOffchargOfflowOffpmOnstChargeddmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOffchargOfflowOffpmOnstChargeddmOff.svg";
|
"assets/icons/battery/dmOff/perOffchargOfflowOffpmOnstChargeddmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOnpmOffstDefaultdmOff
|
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOnpmOffstDefaultdmOff
|
||||||
/// assets/icons/battery/dmOff/perOffchargOfflowOnpmOffstDefaultdmOff.svg
|
/// assets/icons/battery/dmOff/perOffchargOfflowOnpmOffstDefaultdmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOffchargOfflowOnpmOffstDefaultdmOff =
|
||||||
assetsIconsBatteryDmOffPerOffchargOfflowOnpmOffstDefaultdmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOffchargOfflowOnpmOffstDefaultdmOff.svg";
|
"assets/icons/battery/dmOff/perOffchargOfflowOnpmOffstDefaultdmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOnpmOnstDefaultdmOff
|
/// Assets for assetsIconsBatteryDmOffPerOffchargOfflowOnpmOnstDefaultdmOff
|
||||||
/// assets/icons/battery/dmOff/perOffchargOfflowOnpmOnstDefaultdmOff.svg
|
/// assets/icons/battery/dmOff/perOffchargOfflowOnpmOnstDefaultdmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOffchargOfflowOnpmOnstDefaultdmOff =
|
||||||
assetsIconsBatteryDmOffPerOffchargOfflowOnpmOnstDefaultdmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOffchargOfflowOnpmOnstDefaultdmOff.svg";
|
"assets/icons/battery/dmOff/perOffchargOfflowOnpmOnstDefaultdmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOnlowOffpmOffstChargeddmOff
|
/// Assets for assetsIconsBatteryDmOffPerOffchargOnlowOffpmOffstChargeddmOff
|
||||||
/// assets/icons/battery/dmOff/perOffchargOnlowOffpmOffstChargeddmOff.svg
|
/// assets/icons/battery/dmOff/perOffchargOnlowOffpmOffstChargeddmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOffchargOnlowOffpmOffstChargeddmOff =
|
||||||
assetsIconsBatteryDmOffPerOffchargOnlowOffpmOffstChargeddmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOffchargOnlowOffpmOffstChargeddmOff.svg";
|
"assets/icons/battery/dmOff/perOffchargOnlowOffpmOffstChargeddmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOnlowOnpmOffstlowBatterydmOff
|
/// Assets for assetsIconsBatteryDmOffPerOffchargOnlowOnpmOffstlowBatterydmOff
|
||||||
/// assets/icons/battery/dmOff/perOffchargOnlowOnpmOffstlowBatterydmOff.svg
|
/// assets/icons/battery/dmOff/perOffchargOnlowOnpmOffstlowBatterydmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOffchargOnlowOnpmOffstlowBatterydmOff =
|
||||||
assetsIconsBatteryDmOffPerOffchargOnlowOnpmOffstlowBatterydmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOffchargOnlowOnpmOffstlowBatterydmOff.svg";
|
"assets/icons/battery/dmOff/perOffchargOnlowOnpmOffstlowBatterydmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOffchargOnlowOnpmOnstlowpmdmOff
|
/// Assets for assetsIconsBatteryDmOffPerOffchargOnlowOnpmOnstlowpmdmOff
|
||||||
/// assets/icons/battery/dmOff/perOffchargOnlowOnpmOnstlowpmdmOff.svg
|
/// assets/icons/battery/dmOff/perOffchargOnlowOnpmOnstlowpmdmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOffchargOnlowOnpmOnstlowpmdmOff =
|
||||||
assetsIconsBatteryDmOffPerOffchargOnlowOnpmOnstlowpmdmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOffchargOnlowOnpmOnstlowpmdmOff.svg";
|
"assets/icons/battery/dmOff/perOffchargOnlowOnpmOnstlowpmdmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstChargeddmOff
|
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstChargeddmOff
|
||||||
/// assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstChargeddmOff.svg
|
/// assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstChargeddmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstChargeddmOff =
|
||||||
assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstChargeddmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstChargeddmOff.svg";
|
"assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstChargeddmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstDefaultdmOff
|
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstDefaultdmOff
|
||||||
/// assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstDefaultdmOff.svg
|
/// assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstDefaultdmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstDefaultdmOff =
|
||||||
assetsIconsBatteryDmOffPerOnchargOfflowOffpmOffstDefaultdmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstDefaultdmOff.svg";
|
"assets/icons/battery/dmOff/perOnchargOfflowOffpmOffstDefaultdmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOffpmOnstChargeddmOff
|
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOffpmOnstChargeddmOff
|
||||||
/// assets/icons/battery/dmOff/perOnchargOfflowOffpmOnstChargeddmOff.svg
|
/// assets/icons/battery/dmOff/perOnchargOfflowOffpmOnstChargeddmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOnchargOfflowOffpmOnstChargeddmOff =
|
||||||
assetsIconsBatteryDmOffPerOnchargOfflowOffpmOnstChargeddmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOnchargOfflowOffpmOnstChargeddmOff.svg";
|
"assets/icons/battery/dmOff/perOnchargOfflowOffpmOnstChargeddmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOnpmOffstDefaultdmOff
|
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOnpmOffstDefaultdmOff
|
||||||
/// assets/icons/battery/dmOff/perOnchargOfflowOnpmOffstDefaultdmOff.svg
|
/// assets/icons/battery/dmOff/perOnchargOfflowOnpmOffstDefaultdmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOnchargOfflowOnpmOffstDefaultdmOff =
|
||||||
assetsIconsBatteryDmOffPerOnchargOfflowOnpmOffstDefaultdmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOnchargOfflowOnpmOffstDefaultdmOff.svg";
|
"assets/icons/battery/dmOff/perOnchargOfflowOnpmOffstDefaultdmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOnpmOnstDefaultdmOff
|
/// Assets for assetsIconsBatteryDmOffPerOnchargOfflowOnpmOnstDefaultdmOff
|
||||||
/// assets/icons/battery/dmOff/perOnchargOfflowOnpmOnstDefaultdmOff.svg
|
/// assets/icons/battery/dmOff/perOnchargOfflowOnpmOnstDefaultdmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOnchargOfflowOnpmOnstDefaultdmOff =
|
||||||
assetsIconsBatteryDmOffPerOnchargOfflowOnpmOnstDefaultdmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOnchargOfflowOnpmOnstDefaultdmOff.svg";
|
"assets/icons/battery/dmOff/perOnchargOfflowOnpmOnstDefaultdmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOnlowOffpmOffstChargeddmOff
|
/// Assets for assetsIconsBatteryDmOffPerOnchargOnlowOffpmOffstChargeddmOff
|
||||||
/// assets/icons/battery/dmOff/perOnchargOnlowOffpmOffstChargeddmOff.svg
|
/// assets/icons/battery/dmOff/perOnchargOnlowOffpmOffstChargeddmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOnchargOnlowOffpmOffstChargeddmOff =
|
||||||
assetsIconsBatteryDmOffPerOnchargOnlowOffpmOffstChargeddmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOnchargOnlowOffpmOffstChargeddmOff.svg";
|
"assets/icons/battery/dmOff/perOnchargOnlowOffpmOffstChargeddmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOnlowOnpmOffstlowBatterydmOff
|
/// Assets for assetsIconsBatteryDmOffPerOnchargOnlowOnpmOffstlowBatterydmOff
|
||||||
/// assets/icons/battery/dmOff/perOnchargOnlowOnpmOffstlowBatterydmOff.svg
|
/// assets/icons/battery/dmOff/perOnchargOnlowOnpmOffstlowBatterydmOff.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOffPerOnchargOnlowOnpmOffstlowBatterydmOff =
|
||||||
assetsIconsBatteryDmOffPerOnchargOnlowOnpmOffstlowBatterydmOff =
|
|
||||||
"assets/icons/battery/dmOff/perOnchargOnlowOnpmOffstlowBatterydmOff.svg";
|
"assets/icons/battery/dmOff/perOnchargOnlowOnpmOffstlowBatterydmOff.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOffPerOnchargOnlowOnpmOnstlowpmdmOff
|
/// Assets for assetsIconsBatteryDmOffPerOnchargOnlowOnpmOnstlowpmdmOff
|
||||||
@ -120,44 +103,37 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstChargeddmOn
|
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstChargeddmOn
|
||||||
/// assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstChargeddmOn.svg
|
/// assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstChargeddmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstChargeddmOn =
|
||||||
assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstChargeddmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstChargeddmOn.svg";
|
"assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstChargeddmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstDefaultdmOn
|
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstDefaultdmOn
|
||||||
/// assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstDefaultdmOn.svg
|
/// assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstDefaultdmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstDefaultdmOn =
|
||||||
assetsIconsBatteryDmOnPerOffchargOfflowOffpmOffstDefaultdmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstDefaultdmOn.svg";
|
"assets/icons/battery/dmOn/perOffchargOfflowOffpmOffstDefaultdmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOffpmOnstChargeddmOn
|
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOffpmOnstChargeddmOn
|
||||||
/// assets/icons/battery/dmOn/perOffchargOfflowOffpmOnstChargeddmOn.svg
|
/// assets/icons/battery/dmOn/perOffchargOfflowOffpmOnstChargeddmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOffchargOfflowOffpmOnstChargeddmOn =
|
||||||
assetsIconsBatteryDmOnPerOffchargOfflowOffpmOnstChargeddmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOffchargOfflowOffpmOnstChargeddmOn.svg";
|
"assets/icons/battery/dmOn/perOffchargOfflowOffpmOnstChargeddmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOnpmOffstDefaultdmOn
|
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOnpmOffstDefaultdmOn
|
||||||
/// assets/icons/battery/dmOn/perOffchargOfflowOnpmOffstDefaultdmOn.svg
|
/// assets/icons/battery/dmOn/perOffchargOfflowOnpmOffstDefaultdmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOffchargOfflowOnpmOffstDefaultdmOn =
|
||||||
assetsIconsBatteryDmOnPerOffchargOfflowOnpmOffstDefaultdmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOffchargOfflowOnpmOffstDefaultdmOn.svg";
|
"assets/icons/battery/dmOn/perOffchargOfflowOnpmOffstDefaultdmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOnpmOnstDefaultdmOn
|
/// Assets for assetsIconsBatteryDmOnPerOffchargOfflowOnpmOnstDefaultdmOn
|
||||||
/// assets/icons/battery/dmOn/perOffchargOfflowOnpmOnstDefaultdmOn.svg
|
/// assets/icons/battery/dmOn/perOffchargOfflowOnpmOnstDefaultdmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOffchargOfflowOnpmOnstDefaultdmOn =
|
||||||
assetsIconsBatteryDmOnPerOffchargOfflowOnpmOnstDefaultdmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOffchargOfflowOnpmOnstDefaultdmOn.svg";
|
"assets/icons/battery/dmOn/perOffchargOfflowOnpmOnstDefaultdmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOnlowOffpmOffstChargeddmOn
|
/// Assets for assetsIconsBatteryDmOnPerOffchargOnlowOffpmOffstChargeddmOn
|
||||||
/// assets/icons/battery/dmOn/perOffchargOnlowOffpmOffstChargeddmOn.svg
|
/// assets/icons/battery/dmOn/perOffchargOnlowOffpmOffstChargeddmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOffchargOnlowOffpmOffstChargeddmOn =
|
||||||
assetsIconsBatteryDmOnPerOffchargOnlowOffpmOffstChargeddmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOffchargOnlowOffpmOffstChargeddmOn.svg";
|
"assets/icons/battery/dmOn/perOffchargOnlowOffpmOffstChargeddmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOnlowOnpmOffstlowBatterydmOn
|
/// Assets for assetsIconsBatteryDmOnPerOffchargOnlowOnpmOffstlowBatterydmOn
|
||||||
/// assets/icons/battery/dmOn/perOffchargOnlowOnpmOffstlowBatterydmOn.svg
|
/// assets/icons/battery/dmOn/perOffchargOnlowOnpmOffstlowBatterydmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOffchargOnlowOnpmOffstlowBatterydmOn =
|
||||||
assetsIconsBatteryDmOnPerOffchargOnlowOnpmOffstlowBatterydmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOffchargOnlowOnpmOffstlowBatterydmOn.svg";
|
"assets/icons/battery/dmOn/perOffchargOnlowOnpmOffstlowBatterydmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOffchargOnlowOnpmOnstlowpmdmOn
|
/// Assets for assetsIconsBatteryDmOnPerOffchargOnlowOnpmOnstlowpmdmOn
|
||||||
@ -167,44 +143,37 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstChargeddmOn
|
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstChargeddmOn
|
||||||
/// assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstChargeddmOn.svg
|
/// assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstChargeddmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstChargeddmOn =
|
||||||
assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstChargeddmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstChargeddmOn.svg";
|
"assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstChargeddmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstDefaultdmOn
|
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstDefaultdmOn
|
||||||
/// assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstDefaultdmOn.svg
|
/// assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstDefaultdmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstDefaultdmOn =
|
||||||
assetsIconsBatteryDmOnPerOnchargOfflowOffpmOffstDefaultdmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstDefaultdmOn.svg";
|
"assets/icons/battery/dmOn/perOnchargOfflowOffpmOffstDefaultdmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOffpmOnstChargeddmOn
|
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOffpmOnstChargeddmOn
|
||||||
/// assets/icons/battery/dmOn/perOnchargOfflowOffpmOnstChargeddmOn.svg
|
/// assets/icons/battery/dmOn/perOnchargOfflowOffpmOnstChargeddmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOnchargOfflowOffpmOnstChargeddmOn =
|
||||||
assetsIconsBatteryDmOnPerOnchargOfflowOffpmOnstChargeddmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOnchargOfflowOffpmOnstChargeddmOn.svg";
|
"assets/icons/battery/dmOn/perOnchargOfflowOffpmOnstChargeddmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOnpmOffstDefaultdmOn
|
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOnpmOffstDefaultdmOn
|
||||||
/// assets/icons/battery/dmOn/perOnchargOfflowOnpmOffstDefaultdmOn.svg
|
/// assets/icons/battery/dmOn/perOnchargOfflowOnpmOffstDefaultdmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOnchargOfflowOnpmOffstDefaultdmOn =
|
||||||
assetsIconsBatteryDmOnPerOnchargOfflowOnpmOffstDefaultdmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOnchargOfflowOnpmOffstDefaultdmOn.svg";
|
"assets/icons/battery/dmOn/perOnchargOfflowOnpmOffstDefaultdmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOnpmOnstDefaultdmOn
|
/// Assets for assetsIconsBatteryDmOnPerOnchargOfflowOnpmOnstDefaultdmOn
|
||||||
/// assets/icons/battery/dmOn/perOnchargOfflowOnpmOnstDefaultdmOn.svg
|
/// assets/icons/battery/dmOn/perOnchargOfflowOnpmOnstDefaultdmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOnchargOfflowOnpmOnstDefaultdmOn =
|
||||||
assetsIconsBatteryDmOnPerOnchargOfflowOnpmOnstDefaultdmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOnchargOfflowOnpmOnstDefaultdmOn.svg";
|
"assets/icons/battery/dmOn/perOnchargOfflowOnpmOnstDefaultdmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOnlowOffpmOffstChargeddmOn
|
/// Assets for assetsIconsBatteryDmOnPerOnchargOnlowOffpmOffstChargeddmOn
|
||||||
/// assets/icons/battery/dmOn/perOnchargOnlowOffpmOffstChargeddmOn.svg
|
/// assets/icons/battery/dmOn/perOnchargOnlowOffpmOffstChargeddmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOnchargOnlowOffpmOffstChargeddmOn =
|
||||||
assetsIconsBatteryDmOnPerOnchargOnlowOffpmOffstChargeddmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOnchargOnlowOffpmOffstChargeddmOn.svg";
|
"assets/icons/battery/dmOn/perOnchargOnlowOffpmOffstChargeddmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOnlowOnpmOffstlowBatterydmOn
|
/// Assets for assetsIconsBatteryDmOnPerOnchargOnlowOnpmOffstlowBatterydmOn
|
||||||
/// assets/icons/battery/dmOn/perOnchargOnlowOnpmOffstlowBatterydmOn.svg
|
/// assets/icons/battery/dmOn/perOnchargOnlowOnpmOffstlowBatterydmOn.svg
|
||||||
static const String
|
static const String assetsIconsBatteryDmOnPerOnchargOnlowOnpmOffstlowBatterydmOn =
|
||||||
assetsIconsBatteryDmOnPerOnchargOnlowOnpmOffstlowBatterydmOn =
|
|
||||||
"assets/icons/battery/dmOn/perOnchargOnlowOnpmOffstlowBatterydmOn.svg";
|
"assets/icons/battery/dmOn/perOnchargOnlowOnpmOffstlowBatterydmOn.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsBatteryDmOnPerOnchargOnlowOnpmOnstlowpmdmOn
|
/// Assets for assetsIconsBatteryDmOnPerOnchargOnlowOnpmOnstlowpmdmOn
|
||||||
@ -254,8 +223,7 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsIconsDashboardFill
|
/// Assets for assetsIconsDashboardFill
|
||||||
/// assets/icons/dashboard-fill.svg
|
/// assets/icons/dashboard-fill.svg
|
||||||
static const String assetsIconsDashboardFill =
|
static const String assetsIconsDashboardFill = "assets/icons/dashboard-fill.svg";
|
||||||
"assets/icons/dashboard-fill.svg";
|
|
||||||
|
|
||||||
/// Assets for assetsIconsDevices
|
/// Assets for assetsIconsDevices
|
||||||
/// assets/icons/Devices.svg
|
/// assets/icons/Devices.svg
|
||||||
@ -271,8 +239,7 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsIconsDoorLockLinkage
|
/// Assets for assetsIconsDoorLockLinkage
|
||||||
/// assets/icons/DoorLockLinkage.svg
|
/// assets/icons/DoorLockLinkage.svg
|
||||||
static const String assetsIconsDoorLockLinkage =
|
static const String assetsIconsDoorLockLinkage = "assets/icons/DoorLockLinkage.svg";
|
||||||
"assets/icons/DoorLockLinkage.svg";
|
|
||||||
|
|
||||||
/// Assets for assetsIconsDoorLockLock
|
/// Assets for assetsIconsDoorLockLock
|
||||||
/// assets/icons/DoorLockLock.svg
|
/// assets/icons/DoorLockLock.svg
|
||||||
@ -280,18 +247,15 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsIconsDoorLockMembers
|
/// Assets for assetsIconsDoorLockMembers
|
||||||
/// assets/icons/DoorLockMembers.svg
|
/// assets/icons/DoorLockMembers.svg
|
||||||
static const String assetsIconsDoorLockMembers =
|
static const String assetsIconsDoorLockMembers = "assets/icons/DoorLockMembers.svg";
|
||||||
"assets/icons/DoorLockMembers.svg";
|
|
||||||
|
|
||||||
/// Assets for assetsIconsDoorLockPassword
|
/// Assets for assetsIconsDoorLockPassword
|
||||||
/// assets/icons/DoorLockPassword.svg
|
/// assets/icons/DoorLockPassword.svg
|
||||||
static const String assetsIconsDoorLockPassword =
|
static const String assetsIconsDoorLockPassword = "assets/icons/DoorLockPassword.svg";
|
||||||
"assets/icons/DoorLockPassword.svg";
|
|
||||||
|
|
||||||
/// Assets for assetsIconsDoorLockRecords
|
/// Assets for assetsIconsDoorLockRecords
|
||||||
/// assets/icons/DoorLockRecords.svg
|
/// assets/icons/DoorLockRecords.svg
|
||||||
static const String assetsIconsDoorLockRecords =
|
static const String assetsIconsDoorLockRecords = "assets/icons/DoorLockRecords.svg";
|
||||||
"assets/icons/DoorLockRecords.svg";
|
|
||||||
|
|
||||||
/// Assets for assetsIconsDoorlockAssetsBatteryIndicator
|
/// Assets for assetsIconsDoorlockAssetsBatteryIndicator
|
||||||
/// assets/icons/doorlock-assets/BatteryIndicator.svg
|
/// assets/icons/doorlock-assets/BatteryIndicator.svg
|
||||||
@ -399,13 +363,11 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsIconsLightSwitchOff
|
/// Assets for assetsIconsLightSwitchOff
|
||||||
/// assets/icons/lightSwitchOff.svg
|
/// assets/icons/lightSwitchOff.svg
|
||||||
static const String assetsIconsLightSwitchOff =
|
static const String assetsIconsLightSwitchOff = "assets/icons/lightSwitchOff.svg";
|
||||||
"assets/icons/lightSwitchOff.svg";
|
|
||||||
|
|
||||||
/// Assets for assetsIconsLightSwitchOn
|
/// Assets for assetsIconsLightSwitchOn
|
||||||
/// assets/icons/lightSwitchOn.svg
|
/// assets/icons/lightSwitchOn.svg
|
||||||
static const String assetsIconsLightSwitchOn =
|
static const String assetsIconsLightSwitchOn = "assets/icons/lightSwitchOn.svg";
|
||||||
"assets/icons/lightSwitchOn.svg";
|
|
||||||
|
|
||||||
/// Assets for assetsIconsLinkageIconsDoorLockAlarm
|
/// Assets for assetsIconsLinkageIconsDoorLockAlarm
|
||||||
/// assets/icons/linkageIcons/doorLockAlarm.svg
|
/// assets/icons/linkageIcons/doorLockAlarm.svg
|
||||||
@ -421,6 +383,8 @@ class Assets {
|
|||||||
/// assets/icons/lock.svg
|
/// assets/icons/lock.svg
|
||||||
static const String assetsIconsLock = "assets/icons/lock.svg";
|
static const String assetsIconsLock = "assets/icons/lock.svg";
|
||||||
|
|
||||||
|
static const String assetsIconsUnLock = "assets/icons/unlock_ic.svg";
|
||||||
|
|
||||||
/// Assets for assetsIconsLogo
|
/// Assets for assetsIconsLogo
|
||||||
/// assets/icons/logo.png
|
/// assets/icons/logo.png
|
||||||
static const String assetsIconsLogo = "assets/icons/logo.png";
|
static const String assetsIconsLogo = "assets/icons/logo.png";
|
||||||
@ -597,8 +561,7 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsIconsRoutinesFill
|
/// Assets for assetsIconsRoutinesFill
|
||||||
/// assets/icons/Routines-fill.svg
|
/// assets/icons/Routines-fill.svg
|
||||||
static const String assetsIconsRoutinesFill =
|
static const String assetsIconsRoutinesFill = "assets/icons/Routines-fill.svg";
|
||||||
"assets/icons/Routines-fill.svg";
|
|
||||||
|
|
||||||
/// Assets for assetsIconsScan
|
/// Assets for assetsIconsScan
|
||||||
/// assets/icons/Scan.svg
|
/// assets/icons/Scan.svg
|
||||||
@ -630,8 +593,7 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsIconsSustainability
|
/// Assets for assetsIconsSustainability
|
||||||
/// assets/icons/sustainability.svg
|
/// assets/icons/sustainability.svg
|
||||||
static const String assetsIconsSustainability =
|
static const String assetsIconsSustainability = "assets/icons/sustainability.svg";
|
||||||
"assets/icons/sustainability.svg";
|
|
||||||
|
|
||||||
/// Assets for assetsIconsUnlockingMethodsIconsFace
|
/// Assets for assetsIconsUnlockingMethodsIconsFace
|
||||||
/// assets/icons/unlockingMethodsIcons/face.svg
|
/// assets/icons/unlockingMethodsIcons/face.svg
|
||||||
@ -710,8 +672,7 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsImagesHorizintalBlade
|
/// Assets for assetsImagesHorizintalBlade
|
||||||
/// assets/images/HorizintalBlade.png
|
/// assets/images/HorizintalBlade.png
|
||||||
static const String assetsImagesHorizintalBlade =
|
static const String assetsImagesHorizintalBlade = "assets/images/HorizintalBlade.png";
|
||||||
"assets/images/HorizintalBlade.png";
|
|
||||||
|
|
||||||
/// Assets for assetsImagesLogo
|
/// Assets for assetsImagesLogo
|
||||||
/// assets/images/Logo.svg
|
/// assets/images/Logo.svg
|
||||||
@ -719,8 +680,7 @@ class Assets {
|
|||||||
|
|
||||||
/// Assets for assetsImagesLogoHorizontal
|
/// Assets for assetsImagesLogoHorizontal
|
||||||
/// assets/images/logo_horizontal.png
|
/// assets/images/logo_horizontal.png
|
||||||
static const String assetsImagesLogoHorizontal =
|
static const String assetsImagesLogoHorizontal = "assets/images/logo_horizontal.png";
|
||||||
"assets/images/logo_horizontal.png";
|
|
||||||
|
|
||||||
/// Assets for assetsImagesPause
|
/// Assets for assetsImagesPause
|
||||||
/// assets/images/Pause.png
|
/// assets/images/Pause.png
|
||||||
|
@ -72,9 +72,7 @@ Map<String, DeviceType> devicesTypesMap = {
|
|||||||
Map<DeviceType, List<FunctionModel>> devicesFunctionsMap = {
|
Map<DeviceType, List<FunctionModel>> devicesFunctionsMap = {
|
||||||
DeviceType.AC: [
|
DeviceType.AC: [
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'switch',
|
code: 'switch', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})),
|
||||||
type: functionTypesMap['Boolean'],
|
|
||||||
values: ValueModel.fromJson({})),
|
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'mode',
|
code: 'mode',
|
||||||
type: functionTypesMap['Enum'],
|
type: functionTypesMap['Enum'],
|
||||||
@ -97,9 +95,7 @@ Map<DeviceType, List<FunctionModel>> devicesFunctionsMap = {
|
|||||||
// "range": ["low", "middle", "high", "auto"]
|
// "range": ["low", "middle", "high", "auto"]
|
||||||
})),
|
})),
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'child_lock',
|
code: 'child_lock', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})),
|
||||||
type: functionTypesMap['Boolean'],
|
|
||||||
values: ValueModel.fromJson({})),
|
|
||||||
],
|
],
|
||||||
DeviceType.Gateway: [
|
DeviceType.Gateway: [
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
@ -113,9 +109,7 @@ Map<DeviceType, List<FunctionModel>> devicesFunctionsMap = {
|
|||||||
"range": ["normal", "alarm"]
|
"range": ["normal", "alarm"]
|
||||||
})),
|
})),
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'factory_reset',
|
code: 'factory_reset', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})),
|
||||||
type: functionTypesMap['Boolean'],
|
|
||||||
values: ValueModel.fromJson({})),
|
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'alarm_active',
|
code: 'alarm_active',
|
||||||
type: functionTypesMap['String'],
|
type: functionTypesMap['String'],
|
||||||
@ -125,8 +119,7 @@ Map<DeviceType, List<FunctionModel>> devicesFunctionsMap = {
|
|||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'sensitivity',
|
code: 'sensitivity',
|
||||||
type: functionTypesMap['Integer'],
|
type: functionTypesMap['Integer'],
|
||||||
values: ValueModel.fromJson(
|
values: ValueModel.fromJson({"unit": "", "min": 1, "max": 10, "scale": 0, "step": 1})),
|
||||||
{"unit": "", "min": 1, "max": 10, "scale": 0, "step": 1})),
|
|
||||||
],
|
],
|
||||||
DeviceType.DoorLock: [
|
DeviceType.DoorLock: [
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
@ -134,9 +127,7 @@ Map<DeviceType, List<FunctionModel>> devicesFunctionsMap = {
|
|||||||
type: functionTypesMap['Raw'],
|
type: functionTypesMap['Raw'],
|
||||||
values: ValueModel.fromJson({})),
|
values: ValueModel.fromJson({})),
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'remote_no_dp_key',
|
code: 'remote_no_dp_key', type: functionTypesMap['Raw'], values: ValueModel.fromJson({})),
|
||||||
type: functionTypesMap['Raw'],
|
|
||||||
values: ValueModel.fromJson({})),
|
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'normal_open_switch',
|
code: 'normal_open_switch',
|
||||||
type: functionTypesMap['Boolean'],
|
type: functionTypesMap['Boolean'],
|
||||||
@ -146,56 +137,42 @@ Map<DeviceType, List<FunctionModel>> devicesFunctionsMap = {
|
|||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'far_detection',
|
code: 'far_detection',
|
||||||
type: functionTypesMap['Integer'],
|
type: functionTypesMap['Integer'],
|
||||||
values: ValueModel.fromJson(
|
values: ValueModel.fromJson({"unit": "cm", "min": 75, "max": 600, "scale": 0, "step": 75})),
|
||||||
{"unit": "cm", "min": 75, "max": 600, "scale": 0, "step": 75})),
|
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'presence_time',
|
code: 'presence_time',
|
||||||
type: functionTypesMap['Integer'],
|
type: functionTypesMap['Integer'],
|
||||||
values: ValueModel.fromJson(
|
values:
|
||||||
{"unit": "Min", "min": 0, "max": 65535, "scale": 0, "step": 1})),
|
ValueModel.fromJson({"unit": "Min", "min": 0, "max": 65535, "scale": 0, "step": 1})),
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'motion_sensitivity_value',
|
code: 'motion_sensitivity_value',
|
||||||
type: functionTypesMap['Integer'],
|
type: functionTypesMap['Integer'],
|
||||||
values: ValueModel.fromJson(
|
values: ValueModel.fromJson({"unit": "", "min": 1, "max": 5, "scale": 0, "step": 1})),
|
||||||
{"unit": "", "min": 1, "max": 5, "scale": 0, "step": 1})),
|
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'motionless_sensitivity',
|
code: 'motionless_sensitivity',
|
||||||
type: functionTypesMap['Integer'],
|
type: functionTypesMap['Integer'],
|
||||||
values: ValueModel.fromJson(
|
values: ValueModel.fromJson({"unit": "", "min": 1, "max": 5, "scale": 0, "step": 1})),
|
||||||
{"unit": "", "min": 1, "max": 5, "scale": 0, "step": 1})),
|
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'indicator',
|
code: 'indicator', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})),
|
||||||
type: functionTypesMap['Boolean'],
|
|
||||||
values: ValueModel.fromJson({})),
|
|
||||||
],
|
],
|
||||||
DeviceType.ThreeGang: [
|
DeviceType.ThreeGang: [
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'switch_1',
|
code: 'switch_1', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})),
|
||||||
type: functionTypesMap['Boolean'],
|
|
||||||
values: ValueModel.fromJson({})),
|
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'switch_2',
|
code: 'switch_2', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})),
|
||||||
type: functionTypesMap['Boolean'],
|
|
||||||
values: ValueModel.fromJson({})),
|
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'switch_3',
|
code: 'switch_3', type: functionTypesMap['Boolean'], values: ValueModel.fromJson({})),
|
||||||
type: functionTypesMap['Boolean'],
|
|
||||||
values: ValueModel.fromJson({})),
|
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'countdown_1',
|
code: 'countdown_1',
|
||||||
type: functionTypesMap['Integer'],
|
type: functionTypesMap['Integer'],
|
||||||
values: ValueModel.fromJson(
|
values: ValueModel.fromJson({"unit": "s", "min": 0, "max": 43200, "scale": 0, "step": 1})),
|
||||||
{"unit": "s", "min": 0, "max": 43200, "scale": 0, "step": 1})),
|
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'countdown_2',
|
code: 'countdown_2',
|
||||||
type: functionTypesMap['Integer'],
|
type: functionTypesMap['Integer'],
|
||||||
values: ValueModel.fromJson(
|
values: ValueModel.fromJson({"unit": "s", "min": 0, "max": 43200, "scale": 0, "step": 1})),
|
||||||
{"unit": "s", "min": 0, "max": 43200, "scale": 0, "step": 1})),
|
|
||||||
FunctionModel(
|
FunctionModel(
|
||||||
code: 'countdown_3',
|
code: 'countdown_3',
|
||||||
type: functionTypesMap['Integer'],
|
type: functionTypesMap['Integer'],
|
||||||
values: ValueModel.fromJson(
|
values: ValueModel.fromJson({"unit": "s", "min": 0, "max": 43200, "scale": 0, "step": 1})),
|
||||||
{"unit": "s", "min": 0, "max": 43200, "scale": 0, "step": 1})),
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -342,11 +319,7 @@ List<Map<String, Object>> menuSections = [
|
|||||||
'Icon': Assets.assetsIconsMenuIconsMessagesCenterIconsMessages,
|
'Icon': Assets.assetsIconsMenuIconsMessagesCenterIconsMessages,
|
||||||
'page': null
|
'page': null
|
||||||
},
|
},
|
||||||
{
|
{'title': 'FAQs', 'Icon': Assets.assetsIconsMenuIconsMessagesCenterIconsFAQs, 'page': null},
|
||||||
'title': 'FAQs',
|
|
||||||
'Icon': Assets.assetsIconsMenuIconsMessagesCenterIconsFAQs,
|
|
||||||
'page': null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'title': 'Help & Feedback',
|
'title': 'Help & Feedback',
|
||||||
'Icon': Assets.assetsIconsMenuIconsMessagesCenterIconsHelpAndFeedback,
|
'Icon': Assets.assetsIconsMenuIconsMessagesCenterIconsHelpAndFeedback,
|
||||||
@ -376,11 +349,7 @@ List<Map<String, Object>> menuSections = [
|
|||||||
'title': 'Legal Information',
|
'title': 'Legal Information',
|
||||||
'color': const Color(0xFF001B72),
|
'color': const Color(0xFF001B72),
|
||||||
'buttons': [
|
'buttons': [
|
||||||
{
|
{'title': 'About', 'Icon': Assets.assetsIconsMenuIconsLeagalInfoIconsAbout, 'page': null},
|
||||||
'title': 'About',
|
|
||||||
'Icon': Assets.assetsIconsMenuIconsLeagalInfoIconsAbout,
|
|
||||||
'page': null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'title': 'Privacy Policy',
|
'title': 'Privacy Policy',
|
||||||
'Icon': Assets.assetsIconsMenuIconsLeagalInfoIconsPrivacyPolicy,
|
'Icon': Assets.assetsIconsMenuIconsLeagalInfoIconsPrivacyPolicy,
|
||||||
|
Reference in New Issue
Block a user