revert: Keep button, add judgment

This commit is contained in:
tension
2024-08-31 11:57:39 +08:00
parent 21096144a3
commit 5aa55b50a4

View File

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