Skip to content

Commit

Permalink
Merge branch 'check-nested-page'
Browse files Browse the repository at this point in the history
  • Loading branch information
haolun committed Jun 1, 2023
2 parents 67ff272 + f810501 commit ae846dd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/Core/x_base_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,19 @@ abstract class BaseXWidget<T extends BaseXController> extends GetWidget<T> {
}

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(
Expand Down Expand Up @@ -148,7 +155,8 @@ abstract class BaseXWidget<T extends BaseXController> extends GetWidget<T> {
),
),
if (baseConstant.position == Position.bottom &&
baseConstant.appEnv == Environment.Staging)
baseConstant.appEnv == Environment.Staging &&
isPage)
envBar(),
],
),
Expand Down

0 comments on commit ae846dd

Please sign in to comment.