diff --git a/lib/features/devices/bloc/one_gang_bloc/one_gang_bloc.dart b/lib/features/devices/bloc/one_gang_bloc/one_gang_bloc.dart index 6dce09c..f4bb8ea 100644 --- a/lib/features/devices/bloc/one_gang_bloc/one_gang_bloc.dart +++ b/lib/features/devices/bloc/one_gang_bloc/one_gang_bloc.dart @@ -242,7 +242,6 @@ class OneGangBloc extends Bloc { } int? getTimeStampWithoutSeconds(DateTime? dateTime) { - print(dateTime); if (dateTime == null) return null; DateTime dateTimeWithoutSeconds = DateTime(dateTime.year, dateTime.month, dateTime.day, dateTime.hour, dateTime.minute); @@ -265,7 +264,6 @@ class OneGangBloc extends Bloc { } on DioException catch (e) { final errorData = e.response!.data; String errorMessage = errorData['message']; - // debugPrint('errorMessage=${errorMessage}'); emit(FailedState(error: errorMessage.toString())); } } diff --git a/lib/features/devices/bloc/three_gang_bloc/three_gang_bloc.dart b/lib/features/devices/bloc/three_gang_bloc/three_gang_bloc.dart index 38cfab4..a707013 100644 --- a/lib/features/devices/bloc/three_gang_bloc/three_gang_bloc.dart +++ b/lib/features/devices/bloc/three_gang_bloc/three_gang_bloc.dart @@ -472,9 +472,6 @@ class ThreeGangBloc extends Bloc { void _onClose(OnClose event, Emitter emit) { _timer?.cancel(); - // _firstSwitchTimer?.cancel(); - // _secondSwitchTimer?.cancel(); - // _thirdSwitchTimer?.cancel(); } void _onStartTimer(int seconds) { @@ -562,7 +559,6 @@ class ThreeGangBloc extends Bloc { } int? getTimeStampWithoutSeconds(DateTime? dateTime) { - print(dateTime); if (dateTime == null) return null; DateTime dateTimeWithoutSeconds = DateTime(dateTime.year, dateTime.month, dateTime.day, dateTime.hour, dateTime.minute); @@ -585,7 +581,6 @@ class ThreeGangBloc extends Bloc { } on DioException catch (e) { final errorData = e.response!.data; String errorMessage = errorData['message']; - // debugPrint('errorMessage=${errorMessage}'); emit(FailedState(error: errorMessage.toString())); } } diff --git a/lib/features/devices/bloc/two_gang_bloc/two_gang_bloc.dart b/lib/features/devices/bloc/two_gang_bloc/two_gang_bloc.dart index 0772d45..b2f1e45 100644 --- a/lib/features/devices/bloc/two_gang_bloc/two_gang_bloc.dart +++ b/lib/features/devices/bloc/two_gang_bloc/two_gang_bloc.dart @@ -420,9 +420,6 @@ class TwoGangBloc extends Bloc { void _onClose(OnClose event, Emitter emit) { _timer?.cancel(); - // _firstSwitchTimer?.cancel(); - // _secondSwitchTimer?.cancel(); - // _thirdSwitchTimer?.cancel(); } void _onStartTimer(int seconds) { @@ -506,7 +503,6 @@ class TwoGangBloc extends Bloc { } int? getTimeStampWithoutSeconds(DateTime? dateTime) { - print(dateTime); if (dateTime == null) return null; DateTime dateTimeWithoutSeconds = DateTime(dateTime.year, dateTime.month, dateTime.day, dateTime.hour, dateTime.minute); @@ -531,7 +527,6 @@ class TwoGangBloc extends Bloc { } on DioException catch (e) { final errorData = e.response!.data; String errorMessage = errorData['message']; - // debugPrint('errorMessage=${errorMessage}'); emit(FailedState(error: errorMessage.toString())); } } @@ -545,7 +540,6 @@ class TwoGangBloc extends Bloc { deviceUuid: twoGangId, ); if (response == true) { add(GetScheduleEvent()); - // toggleSchedule = event.id; return toggleSchedule; } emit(IsToggleState(onOff: toggleSchedule)); @@ -553,7 +547,6 @@ class TwoGangBloc extends Bloc { } on DioException catch (e) { final errorData = e.response!.data; String errorMessage = errorData['message']; - print('errorMessage=${errorMessage}'); emit(FailedState(error: errorMessage.toString())); } } diff --git a/lib/features/devices/view/widgets/one_gang/one_gang_timer_screen.dart b/lib/features/devices/view/widgets/one_gang/one_gang_timer_screen.dart index c21ccdc..605d5d5 100644 --- a/lib/features/devices/view/widgets/one_gang/one_gang_timer_screen.dart +++ b/lib/features/devices/view/widgets/one_gang/one_gang_timer_screen.dart @@ -8,7 +8,6 @@ import 'package:syncrow_app/features/devices/bloc/one_gang_bloc/one_gang_event.d import 'package:syncrow_app/features/devices/bloc/one_gang_bloc/one_gang_state.dart'; import 'package:syncrow_app/features/devices/model/device_model.dart'; import 'package:syncrow_app/features/shared_widgets/create_schedule.dart'; -import 'package:syncrow_app/features/shared_widgets/default_container.dart'; import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart'; import 'package:syncrow_app/features/shared_widgets/schedule_list.dart'; import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart'; @@ -19,7 +18,6 @@ import 'package:syncrow_app/utils/resource_manager/color_manager.dart'; import 'package:syncrow_app/utils/resource_manager/font_manager.dart'; - class TimerScheduleScreen extends StatelessWidget { final DeviceModel device; final String deviceCode; @@ -111,15 +109,12 @@ class TimerScheduleScreen extends StatelessWidget { oneGangBloc.toggleCreateSchedule(); } oneGangBloc.toggleSelectedIndex(0); - }else{ oneGangBloc.toggleSelectedIndex(1); } }, indicatorColor: Colors.white, // Customize the indicator dividerHeight: 0, - // indicatorWeight: MediaQuery.of(context).size.width, - // indicatorSize: , indicatorSize: TabBarIndicatorSize.tab, indicator: const ShapeDecoration( color: ColorsManager.slidingBlueColor, @@ -158,7 +153,6 @@ class TimerScheduleScreen extends StatelessWidget { ), ], ), - ), Expanded( child: TabBarView( diff --git a/lib/features/devices/view/widgets/three_gang/timer_screen.dart b/lib/features/devices/view/widgets/three_gang/timer_screen.dart index 840b91d..d15d4b1 100644 --- a/lib/features/devices/view/widgets/three_gang/timer_screen.dart +++ b/lib/features/devices/view/widgets/three_gang/timer_screen.dart @@ -118,8 +118,6 @@ class TimerScheduleScreen extends StatelessWidget { }, indicatorColor: Colors.white, // Customize the indicator dividerHeight: 0, - // indicatorWeight: MediaQuery.of(context).size.width, - // indicatorSize: , indicatorSize: TabBarIndicatorSize.tab, indicator: const ShapeDecoration( color: ColorsManager.slidingBlueColor, diff --git a/lib/features/shared_widgets/schedule_list.dart b/lib/features/shared_widgets/schedule_list.dart index f697ca8..0b48f86 100644 --- a/lib/features/shared_widgets/schedule_list.dart +++ b/lib/features/shared_widgets/schedule_list.dart @@ -80,7 +80,7 @@ class ScheduleListView extends StatelessWidget { fontSize: 22, ), Text(listSchedule[index].days.join(' ')), - Text('Function ${listSchedule[index].enable ? "ON" : "OFF"}'), + Text('Function ${listSchedule[index].function.value ? "ON" : "OFF"}'), ], ), ),