From 64c71450ffb711643a31feb752d222f04608f169 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 24 Apr 2021 10:47:13 +0200 Subject: [PATCH] Attempt to fix issue --- lib/forez/ui/routes/forez_route.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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(); }