Skip to content

Commit 1c09780

Browse files
authored
Merge pull request #356 from BrawlerXull/exit
Fixed double tap to exit app
2 parents 86727d6 + 6e9f778 commit 1c09780

File tree

5 files changed

+4
-14
lines changed

5 files changed

+4
-14
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class HomePageBody extends StatelessWidget {
2121
controller.showInAppTour(context);
2222
return DoubleBackToCloseApp(
2323
snackBar: const SnackBar(content: Text('Tap back again to exit')),
24-
// ignore: avoid_unnecessary_containers
2524
child: Container(
2625
color: AppSettings.isDarkMode
2726
? Palette.kToDark.shade200

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ class HomeView extends GetView<HomeController> {
3333

3434
controller.checkForSync(context);
3535

36-
// var taskData = controller.searchedTasks;
37-
38-
// var pendingFilter = controller.pendingFilter;
39-
// var waitingFilter = controller.waitingFilter;
40-
// var pendingTags = controller.pendingTags;
41-
4236
return Obx(
4337
() => Scaffold(
4438
appBar: HomePageAppBar(

lib/app/modules/onboarding/views/onboarding_page_start_button.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ class OnboardingPageStartButton extends StatelessWidget {
1616
child: ElevatedButton(
1717
onPressed: () {
1818
controller.markOnboardingAsCompleted();
19-
// Navigator.of(context).pushAndRemoveUntil(
20-
// MaterialPageRoute(builder: (context) => const HomeView()),
21-
// (Route<dynamic> route) => false,
22-
// );
23-
Get.toNamed(Routes.HOME);
19+
Get.offNamed(Routes.HOME);
2420
},
2521
style: ElevatedButton.styleFrom(
2622
backgroundColor: TaskWarriorColors.black,

lib/app/modules/splash/bindings/splash_binding.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class SplashBinding extends Bindings {
77
void dependencies() {
88
Get.put<SplashController>(
99
SplashController(),
10+
permanent: true,
1011
);
1112
}
1213
}

lib/app/modules/splash/controllers/splash_controller.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ class SplashController extends GetxController {
9797
void sendToNextPage() async {
9898
await checkOnboardingStatus();
9999
if (hasCompletedOnboarding.value) {
100-
Get.toNamed(Routes.HOME);
100+
Get.offNamed(Routes.HOME);
101101
} else {
102-
Get.toNamed(Routes.ONBOARDING);
102+
Get.offNamed(Routes.ONBOARDING);
103103
}
104104
}
105105
}

0 commit comments

Comments
 (0)