diff options
| author | Akshay Nair <phenax5@gmail.com> | 2020-06-04 10:05:10 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2020-06-04 10:05:20 +0530 |
| commit | 1fc86fbaf3127e8aa912960c3b51cac3391e33c0 (patch) | |
| tree | 73aa3906fcf33c397e7935720199d4eca6848d33 | |
| parent | 149840248fc73431d92beeb23e8cb38ce10fdb61 (diff) | |
| download | daft-launcher-1fc86fbaf3127e8aa912960c3b51cac3391e33c0.tar.gz daft-launcher-1fc86fbaf3127e8aa912960c3b51cac3391e33c0.zip | |
Disables back button
Diffstat (limited to '')
| -rw-r--r-- | TODO.md | 4 | ||||
| -rw-r--r-- | lib/main.dart | 31 |
2 files changed, 20 insertions, 15 deletions
@@ -5,10 +5,12 @@ - [X] Transision between pages between pages - [X] Find a way to preload both pages and stop from "loading" - [X] Dark/List themes + - [ ] Add icons in context menu ## Issues - - [ ] Fix scroll/fling conflict (snap) - [ ] Fix uninstall action issue + - [ ] Fix scroll/fling conflict (snap) + - [X] Disable back button - [X] Fix build issue ## HomePage diff --git a/lib/main.dart b/lib/main.dart index 25ea6ee..2f5c415 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -119,20 +119,23 @@ class MyAppState extends StreamState<MyApp> { darkTheme: getDarkTheme(), themeMode: config.value.isDarkMode() ? ThemeMode.dark : ThemeMode.light, home: Scaffold( - body: PageView( - controller: PageController(keepPage: true), - children: [ - HomeView( - dateTime: dateTime.value, - favoriteApps: favoriteApps.value, - openApp: openApp, - openOptionsMenu: openOptionsMenu, - ), - AppsView( - openApp: openApp, - openOptionsMenu: openOptionsMenu, - ), - ], + body: WillPopScope( + onWillPop: () => Future.value(false), + child: PageView( + controller: PageController(keepPage: true), + children: [ + HomeView( + dateTime: dateTime.value, + favoriteApps: favoriteApps.value, + openApp: openApp, + openOptionsMenu: openOptionsMenu, + ), + AppsView( + openApp: openApp, + openOptionsMenu: openOptionsMenu, + ), + ], + ), ), ), ); |
