Bug fixes 3

This commit is contained in:
mohammad
2024-09-23 16:33:02 +03:00
parent 429009aefa
commit dfae04076f
14 changed files with 593 additions and 307 deletions
@@ -82,11 +82,14 @@ class TimerScheduleScreen extends StatelessWidget {
: threeGangBloc.selectedTabIndex == 1
? IconButton(
onPressed: () {
threeGangBloc.toggleCreateSchedule();
// oneGangBloc.toggleCreateSchedule();
threeGangBloc.add(
const ToggleCreateScheduleEvent(
index: 1));
},
icon: const Icon(Icons.add),
)
: SizedBox(),
: const SizedBox(),
],
),
child: state is LoadingInitialState
@@ -103,15 +106,34 @@ class TimerScheduleScreen extends StatelessWidget {
),
),
child: TabBar(
// onTap: (value) {
// if (value == 0) {
// if (threeGangBloc.createSchedule ==
// true) {
// threeGangBloc.toggleCreateSchedule();
// }
// threeGangBloc.toggleSelectedIndex(0);
// } else {
// threeGangBloc.toggleSelectedIndex(1);
// }
// },
onTap: (value) {
if (value == 0) {
if (threeGangBloc.createSchedule ==
true) {
threeGangBloc.toggleCreateSchedule();
// oneGangBloc.toggleCreateSchedule();
threeGangBloc.add(
const ToggleCreateScheduleEvent(
index: 0));
}
threeGangBloc.toggleSelectedIndex(0);
threeGangBloc.add(
const ToggleSelectedEvent(
index: 0));
} else {
threeGangBloc.toggleSelectedIndex(1);
threeGangBloc.add(
const ToggleSelectedEvent(
index: 1));
}
},
indicatorColor: Colors.white,