mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-15 13:43:56 +08:00
improve gesture patch
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -102,7 +102,7 @@ index d121d10f1d6..92fa155c168 100644
|
|||||||
if (!removedEntry && _currentBottomSheet?._widget == bottomSheet && !doingDispose) {
|
if (!removedEntry && _currentBottomSheet?._widget == bottomSheet && !doingDispose) {
|
||||||
removeCurrentBottomSheet();
|
removeCurrentBottomSheet();
|
||||||
diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart
|
diff --git a/packages/flutter/lib/src/widgets/routes.dart b/packages/flutter/lib/src/widgets/routes.dart
|
||||||
index 5c4a8982617..47db0368a85 100644
|
index 5c4a8982617..6621148781a 100644
|
||||||
--- a/packages/flutter/lib/src/widgets/routes.dart
|
--- a/packages/flutter/lib/src/widgets/routes.dart
|
||||||
+++ b/packages/flutter/lib/src/widgets/routes.dart
|
+++ b/packages/flutter/lib/src/widgets/routes.dart
|
||||||
@@ -709,7 +709,11 @@ class LocalHistoryEntry {
|
@@ -709,7 +709,11 @@ class LocalHistoryEntry {
|
||||||
@@ -142,18 +142,21 @@ index 5c4a8982617..47db0368a85 100644
|
|||||||
final LocalHistoryEntry entry = _localHistory!.removeLast();
|
final LocalHistoryEntry entry = _localHistory!.removeLast();
|
||||||
assert(entry._owner == this);
|
assert(entry._owner == this);
|
||||||
entry._owner = null;
|
entry._owner = null;
|
||||||
@@ -970,6 +984,10 @@ mixin LocalHistoryRoute<T> on Route<T> {
|
@@ -970,6 +984,13 @@ mixin LocalHistoryRoute<T> on Route<T> {
|
||||||
bool get willHandlePopInternally {
|
bool get willHandlePopInternally {
|
||||||
return _localHistory != null && _localHistory!.isNotEmpty;
|
return _localHistory != null && _localHistory!.isNotEmpty;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ bool get popGestureEnabled_ {
|
+ bool get popGestureEnabled_ {
|
||||||
|
+ if (popDisposition == RoutePopDisposition.doNotPop) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
+ return _localHistory?.lastOrNull?.popGestureEnabled ?? false;
|
+ return _localHistory?.lastOrNull?.popGestureEnabled ?? false;
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
class _DismissModalAction extends DismissAction {
|
class _DismissModalAction extends DismissAction {
|
||||||
@@ -2839,3 +2857,9 @@ abstract class PopEntry<T> {
|
@@ -2839,3 +2860,9 @@ abstract class PopEntry<T> {
|
||||||
return 'PopEntry canPop: ${canPopNotifier.value}, onPopInvoked: $onPopInvokedWithResult';
|
return 'PopEntry canPop: ${canPopNotifier.value}, onPopInvoked: $onPopInvokedWithResult';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user