Skip to content

Commit

Permalink
Merge pull request #521 from lamarios/fix/back-button-behavior
Browse files Browse the repository at this point in the history
remove unnecessary back button interceptor since changing the way rou…
  • Loading branch information
lamarios authored Apr 10, 2024
2 parents bd3b041 + d1f6f0b commit fbd1fdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
11 changes: 0 additions & 11 deletions lib/home/views/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,6 @@ class _MainScreenState extends State<MainContentScreen> {
@override
void initState() {
super.initState();
BackButtonInterceptor.add((stopDefaultButtonEvent, RouteInfo routeInfo) {
var currentRoute = routeInfo.currentRoute(context);
var settings2 = currentRoute?.settings;
if (settings2?.name != 'HomeRoute') {
AutoRouter.of(context).maybePop();
// navigatorKey.currentState?.pop();
return true;
} else {
return false;
}
}, name: 'mainNavigator', zIndex: 0, ifNotYetIntercepted: true);

// Only after at least the action method is set, the notification events are delivered
AwesomeNotifications()
Expand Down
12 changes: 6 additions & 6 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -590,10 +590,10 @@ packages:
dependency: "direct dev"
description:
name: freezed
sha256: "24f77b50776d4285cc4b3a1665bb79852714c09b878363efbe64788c179c4284"
sha256: "91bce569d4805ea5bad6619a3e8690df8ad062a235165af4c0c5d928dda15eaf"
url: "https://pub.dev"
source: hosted
version: "2.5.0"
version: "2.5.1"
freezed_annotation:
dependency: "direct main"
description:
Expand Down Expand Up @@ -924,10 +924,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
sha256: "51f0d2c554cfbc9d6a312ab35152fc77e2f0b758ce9f1a444a3a1e5b8f3c6b7f"
url: "https://pub.dev"
source: hosted
version: "2.2.2"
version: "2.2.3"
path_provider_foundation:
dependency: transitive
description:
Expand Down Expand Up @@ -1499,10 +1499,10 @@ packages:
dependency: transitive
description:
name: web_socket_channel
sha256: "1d8e795e2a8b3730c41b8a98a2dff2e0fb57ae6f0764a1c46ec5915387d257b2"
sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42"
url: "https://pub.dev"
source: hosted
version: "2.4.4"
version: "2.4.5"
webdriver:
dependency: transitive
description:
Expand Down

0 comments on commit fbd1fdd

Please sign in to comment.