hide back icon when no back

This commit is contained in:
hiddify-com
2024-09-02 05:40:51 +02:00
parent 4bef962812
commit 567208283f
4 changed files with 13 additions and 13 deletions

View File

@@ -40,15 +40,15 @@ class NestedAppBar extends StatelessWidget {
RootScaffold.stateKey.currentState?.openDrawer();
},
)
: 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
}
},
),
: (Navigator.of(context).canPop()
? IconButton(
icon: Icon(context.isRtl ? Icons.arrow_forward : Icons.arrow_back),
padding: EdgeInsets.only(right: context.isRtl ? 50 : 0),
onPressed: () {
Navigator.of(context).pop(); // Pops the current route off the navigator stack
},
)
: null),
title: title,
actions: actions,
pinned: pinned,