mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-21 17:25:16 +00:00
Add [WillPopScope] on tablet mode
This commit is contained in:
@ -21,14 +21,6 @@ class _MainRouteState extends MainController {
|
||||
PageInfo get defaultPage =>
|
||||
PageInfo(type: PageType.NOTIFICATIONS_PAGE, child: NotificationsScreen());
|
||||
|
||||
/// Allows to go to previous tab
|
||||
Future<bool> _willPop() async {
|
||||
if (numberOfPages == 1) return true;
|
||||
|
||||
popPage();
|
||||
return false;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
@ -36,7 +28,7 @@ class _MainRouteState extends MainController {
|
||||
child: SafeArea(
|
||||
// Avoid OS areas
|
||||
child: WillPopScope(
|
||||
onWillPop: _willPop,
|
||||
onWillPop: willPop,
|
||||
child: Scaffold(
|
||||
appBar: currentPage.hideNavBar
|
||||
? null
|
||||
|
Reference in New Issue
Block a user