From 5aa55b50a4187810d258c29f84b65510758fcad6 Mon Sep 17 00:00:00 2001 From: tension Date: Sat, 31 Aug 2024 11:57:39 +0800 Subject: [PATCH] revert: Keep button, add judgment --- lib/features/common/nested_app_bar.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/features/common/nested_app_bar.dart b/lib/features/common/nested_app_bar.dart index 194ba541..6bf377f5 100644 --- a/lib/features/common/nested_app_bar.dart +++ b/lib/features/common/nested_app_bar.dart @@ -40,7 +40,15 @@ class NestedAppBar extends StatelessWidget { RootScaffold.stateKey.currentState?.openDrawer(); }, ) - : null, + : IconButton( + icon: Icon(context.isRtl ? Icons.arrow_forward : Icons.arrow_back), + padding: EdgeInsets.only(right: context.isRtl ? 50 : 0), + onPressed: () { + if (Navigator.of(context).canPop()){ + Navigator.of(context).pop(); // Pops the current route off the navigator stack + } + }, + ), title: title, actions: actions, pinned: pinned,