1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-24 11:58:51 +00:00

Fix pages navigation issue

This commit is contained in:
Pierre HUBERT 2020-05-11 13:38:51 +02:00
parent 1309e7ad3a
commit c65558ef6c
3 changed files with 11 additions and 5 deletions

View File

@ -87,7 +87,9 @@ abstract class MainController extends State<MainRoute> {
/// 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)));

View File

@ -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,

View File

@ -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) {