diff --git a/lib/forez/ui/routes/forez_route.dart b/lib/forez/ui/routes/forez_route.dart index ace2fa6..1b1c8ab 100644 --- a/lib/forez/ui/routes/forez_route.dart +++ b/lib/forez/ui/routes/forez_route.dart @@ -26,9 +26,14 @@ class ForezRoute extends StatefulWidget implements MainRoute { /// Private implementation of HomeController class _MainRouteState extends MainController { + final GlobalKey<_ForezRouteBodyState> _mainKey = GlobalKey(); + @override PageInfo get defaultPage => PageInfo( - type: PageType.OTHER_PAGE, child: ForezRouteBody(), hideNavBar: true); + type: PageType.OTHER_PAGE, + child: ForezRouteBody(key: _mainKey), + hideNavBar: true, + ); @override Widget build(BuildContext context) { @@ -62,6 +67,8 @@ class _MainRouteState extends MainController { enum _PopupMenuItems { ACTION_SETTINGS, ACTION_SIGN_OUT } class ForezRouteBody extends StatefulWidget { + ForezRouteBody({Key key}) : super(key: key); + @override _ForezRouteBodyState createState() => _ForezRouteBodyState(); }