diff --git a/lib/ui/routes/main_route/main_route.dart b/lib/ui/routes/main_route/main_route.dart index fbbe380..16a64d6 100644 --- a/lib/ui/routes/main_route/main_route.dart +++ b/lib/ui/routes/main_route/main_route.dart @@ -87,7 +87,9 @@ abstract class MainController extends State { /// Open user page void openUserPage(int userID) => pushPage(PageInfo( - type: PageType.USER_PAGE, child: UserPageScreen(userID: userID))); + type: PageType.USER_PAGE, + child: UserPageScreen(userID: userID), + id: userID)); void openUserAccessDeniedPage(int userID) => pushPage(PageInfo(child: UserAccessDeniedScreen(userID: userID))); diff --git a/lib/ui/routes/main_route/page_info.dart b/lib/ui/routes/main_route/page_info.dart index d16425c..e142add 100644 --- a/lib/ui/routes/main_route/page_info.dart +++ b/lib/ui/routes/main_route/page_info.dart @@ -22,7 +22,10 @@ class PageInfo { final bool hideNavBar; final bool canShowAsDialog; - const PageInfo({ + /// Unique identification of this child + final key = UniqueKey(); + + PageInfo({ this.type = PageType.OTHER_PAGE, @required this.child, this.id, diff --git a/lib/ui/routes/main_route/tablet_route.dart b/lib/ui/routes/main_route/tablet_route.dart index f4d3ea2..4fa9186 100644 --- a/lib/ui/routes/main_route/tablet_route.dart +++ b/lib/ui/routes/main_route/tablet_route.dart @@ -73,9 +73,10 @@ class _TabletRouteState extends MainController { ); Widget _buildRightPane() => Container( - width: MediaQuery.of(context).size.width - _SideBarSize, - child: currentPage.child, - ); + key: currentPage.key, + width: MediaQuery.of(context).size.width - _SideBarSize, + child: currentPage.child, + ); @override void pushPage(PageInfo page) {