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

View File

@ -82,22 +82,37 @@ class SettingsPage extends StatelessWidget {
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: [ children: [
Column( Expanded(
child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
BodyMedium( SizedBox(
text: _bloc.deviceInfo.name, child: Text(
fontWeight: FontWeight.bold, _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( const SizedBox(
height: 5, height: 5,
), ),
BodySmall( BodySmall(
text: _bloc.deviceInfo text: _bloc
.subspace.subspaceName), .deviceInfo
.subspace
.subspaceName),
], ],
), ),
),
SvgPicture.asset( SvgPicture.asset(
Assets.editNameSetting, Assets.editNameSetting,
fit: BoxFit.contain, fit: BoxFit.contain,

View File

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

View File

@ -142,7 +142,6 @@ class DevicesAPI {
path: ApiEndpoints.deviceScene.replaceAll('{deviceUuid}', deviceId), path: ApiEndpoints.deviceScene.replaceAll('{deviceUuid}', deviceId),
showServerMessage: false, showServerMessage: false,
expectedResponseModel: (json) { expectedResponseModel: (json) {
print(json);
return json; return json;
}); });
return response; 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_automation_model.dart';
import 'package:syncrow_app/features/scene/model/create_scene_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. # 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 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: environment:
sdk: ">=3.0.6 <4.0.0" sdk: ">=3.0.6 <4.0.0"