Skip to content

Commit

Permalink
Fix navigator on large layout
Browse files Browse the repository at this point in the history
  • Loading branch information
3003h committed Nov 1, 2024
1 parent ae78c80 commit 95a85b4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/route/navigator_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,17 @@ class NavigatorUtil {
fenix: true,
);

//命名路由
// 不同显示模式下的跳转方式
if (isLayoutLarge) {
// 大屏幕模式
// pushPageCtrl 前获取当前的tag
final curTag = pageCtrlTag;
Get.find<ControllerTagService>().pushPageCtrl(gid: gid);

logger.t('topSecondRoute: $topSecondRoute');
// 如果当前已经打开了画廊页面
if (topSecondRoute == EHRoutes.galleryPage) {
logger.d('topSecondRoute == EHRoutes.galleryPage');
final curTag = pageCtrlTag;
logger.t(
logger.d(
'curTag $curTag isReg:${Get.isRegistered<GalleryPageController>(tag: curTag)}');
if (Get.isRegistered<GalleryPageController>(tag: curTag) &&
Get.find<GalleryPageController>(tag: curTag).gState.gid == gid) {
Expand Down Expand Up @@ -260,6 +262,7 @@ class NavigatorUtil {
);
}
} else {
// 一般模式
Get.find<ControllerTagService>().pushPageCtrl(gid: gid);
await Get.toNamed(
EHRoutes.galleryPage,
Expand Down

0 comments on commit 95a85b4

Please sign in to comment.