From 567208283f49ea7e48d360101b047b70166e013d Mon Sep 17 00:00:00 2001 From: hiddify-com <114227601+hiddify-com@users.noreply.github.com> Date: Mon, 2 Sep 2024 05:40:51 +0200 Subject: [PATCH] hide back icon when no back --- dependencies.properties | 2 +- lib/features/common/nested_app_bar.dart | 18 +++++++++--------- libcore | 2 +- pubspec.lock | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dependencies.properties b/dependencies.properties index c589c35f..30ef6715 100644 --- a/dependencies.properties +++ b/dependencies.properties @@ -1 +1 @@ -core.version=2.1.5 \ No newline at end of file +core.version=2.3.0 \ No newline at end of file diff --git a/lib/features/common/nested_app_bar.dart b/lib/features/common/nested_app_bar.dart index 6bf377f5..4566ad15 100644 --- a/lib/features/common/nested_app_bar.dart +++ b/lib/features/common/nested_app_bar.dart @@ -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, diff --git a/libcore b/libcore index 3874832c..a4caf23e 160000 --- a/libcore +++ b/libcore @@ -1 +1 @@ -Subproject commit 3874832ccf0bf312f9310829a2b4043febf17f27 +Subproject commit a4caf23ee6d7d60a0ecd983f2268109b353cefc7 diff --git a/pubspec.lock b/pubspec.lock index bd665d1a..87f24145 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1933,10 +1933,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.4" + version: "14.2.5" watcher: dependency: "direct main" description: