fixes issues

This commit is contained in:
mohammad
2024-12-01 09:41:59 +03:00
parent d9ef6de71a
commit 6f02459ad8
6 changed files with 35 additions and 23 deletions

View File

@ -99,8 +99,6 @@ class FourSceneBloc extends Bloc<FourSceneEvent, FourSceneState> {
_selectScene(SelectSceneEvent event, Emitter<FourSceneState> emit) {
emit(FourSceneLoadingState());
print('-------${event.selectedSceneId}------');
print('-------${event.isSelected}------');
if (event.isSelected == false) {
selectedSceneId = '';
selectedFormApiSceneId = '';
@ -187,7 +185,6 @@ class FourSceneBloc extends Bloc<FourSceneEvent, FourSceneState> {
}
}
void _fetchDeviceScene(
FetchDeviceScene event, Emitter<FourSceneState> emit) async {
emit(FourSceneLoadingState());

View File

@ -82,21 +82,36 @@ class SettingsPage extends StatelessWidget {
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
BodyMedium(
text: _bloc.deviceInfo.name,
fontWeight: FontWeight.bold,
),
const SizedBox(
height: 5,
),
BodySmall(
text: _bloc.deviceInfo
.subspace.subspaceName),
],
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SizedBox(
child: Text(
_bloc.deviceInfo.name,
style: const TextStyle(
fontSize: 16,
fontWeight:
FontWeight.w700,
color: ColorsManager
.grayColor,
),
overflow: TextOverflow
.ellipsis, // Adds ellipsis (...) when the text overflows.
maxLines:
1, // Restricts the text to a single line.
)),
const SizedBox(
height: 5,
),
BodySmall(
text: _bloc
.deviceInfo
.subspace
.subspaceName),
],
),
),
SvgPicture.asset(
Assets.editNameSetting,

View File

@ -36,7 +36,7 @@ class _RoomPageState extends State<RoomPage> {
final query = _searchController.text.toLowerCase();
setState(() {
_filteredDevices = widget.room.devices!
.where((device) => device.type!.toLowerCase().contains(query))
.where((device) => device.name!.toLowerCase().contains(query))
.toList();
});
}
@ -51,7 +51,9 @@ class _RoomPageState extends State<RoomPage> {
decoration: InputDecoration(
hintText: 'Search',
hintStyle: const TextStyle(
color: ColorsManager.textGray, fontSize: 16, fontWeight: FontWeight.w400),
color: ColorsManager.textGray,
fontSize: 16,
fontWeight: FontWeight.w400),
prefixIcon: Container(
padding: const EdgeInsets.all(5.0),
margin: const EdgeInsets.all(10.0),

View File

@ -142,7 +142,6 @@ class DevicesAPI {
path: ApiEndpoints.deviceScene.replaceAll('{deviceUuid}', deviceId),
showServerMessage: false,
expectedResponseModel: (json) {
print(json);
return json;
});
return response;

View File

@ -1,4 +1,3 @@
import 'dart:convert';
import 'package:syncrow_app/features/scene/model/create_automation_model.dart';
import 'package:syncrow_app/features/scene/model/create_scene_model.dart';

View File

@ -5,7 +5,7 @@ description: This is the mobile application project, developed with Flutter for
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.9+44
version: 1.0.9+45
environment:
sdk: ">=3.0.6 <4.0.0"