Skip to content

Commit b83826d

Browse files
committed
feat: added toggle switch to sidebar hide or show waiting
1 parent fe94304 commit b83826d

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

lib/app/modules/home/views/filter_drawer_home_page.dart

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -140,27 +140,33 @@ class FilterDrawer extends StatelessWidget {
140140
),
141141
child: Padding(
142142
padding: const EdgeInsets.all(8.0),
143-
child: GestureDetector(
144-
onTap: filters.toggleWaitingFilter,
145-
child: Text(
146-
!filters.waitingFilter
147-
? SentenceManager(
148-
currentLanguage:
149-
homeController.selectedLanguage.value)
150-
.sentences
151-
.filterDrawerShowWaiting
152-
: SentenceManager(
153-
currentLanguage:
154-
homeController.selectedLanguage.value)
155-
.sentences
156-
.filterDrawerHideWaiting,
157-
style: TextStyle(
158-
fontFamily: FontFamily.poppins,
159-
fontSize: TaskWarriorFonts.fontSizeMedium,
160-
color: AppSettings.isDarkMode
161-
? TaskWarriorColors.kprimaryTextColor
162-
: TaskWarriorColors.kLightSecondaryTextColor,
163-
)),
143+
child: Row(
144+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
145+
children: [
146+
Text(
147+
!filters.waitingFilter
148+
? SentenceManager(
149+
currentLanguage:
150+
homeController.selectedLanguage.value)
151+
.sentences
152+
.filterDrawerShowWaiting
153+
: SentenceManager(
154+
currentLanguage:
155+
homeController.selectedLanguage.value)
156+
.sentences
157+
.filterDrawerHideWaiting,
158+
style: TextStyle(
159+
fontFamily: FontFamily.poppins,
160+
fontSize: TaskWarriorFonts.fontSizeMedium,
161+
color: AppSettings.isDarkMode
162+
? TaskWarriorColors.kprimaryTextColor
163+
: TaskWarriorColors.kLightSecondaryTextColor,
164+
)),
165+
Switch(
166+
value: filters.waitingFilter,
167+
onChanged: (_) => filters.toggleWaitingFilter(),
168+
)
169+
],
164170
),
165171
),
166172
),

0 commit comments

Comments
 (0)