From f810501e4daf226f343244e42662b8a817e3c272 Mon Sep 17 00:00:00 2001 From: haolun <> Date: Thu, 1 Jun 2023 15:06:51 +0800 Subject: [PATCH] check nested page --- lib/Core/x_base_widget.dart | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Core/x_base_widget.dart b/lib/Core/x_base_widget.dart index 5ecfa44..708cd43 100644 --- a/lib/Core/x_base_widget.dart +++ b/lib/Core/x_base_widget.dart @@ -100,12 +100,19 @@ abstract class BaseXWidget extends GetWidget { } Widget _contentBody(BuildContext context) { + bool isPage = true; + + if (c.page != null) { + isPage = (c.page as BaseXWidget).routeName == routeName; + } return Stack( children: [ Column( mainAxisSize: MainAxisSize.max, children: [ - if (baseConstant.position == Position.top && baseConstant.appEnv == Environment.Staging) + if (baseConstant.position == Position.top && + baseConstant.appEnv == Environment.Staging && + isPage) envBar(), if (stackedAppBar == null) Expanded( @@ -148,7 +155,8 @@ abstract class BaseXWidget extends GetWidget { ), ), if (baseConstant.position == Position.bottom && - baseConstant.appEnv == Environment.Staging) + baseConstant.appEnv == Environment.Staging && + isPage) envBar(), ], ),