Skip to content

Commit

Permalink
Merge pull request #383 from lamarios/fix/navigation
Browse files Browse the repository at this point in the history
fix broken navigation
  • Loading branch information
lamarios authored Nov 24, 2023
2 parents 9ce270f + 3c89bce commit 3c4b99c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:banner="@drawable/banner"
android:enableOnBackInvokedCallback="true"
>
>
<!-- android:enableOnBackInvokedCallback="true"-->
<activity android:name="com.linusu.flutter_web_auth.CallbackActivity" android:exported="true">
<intent-filter android:label="flutter_web_auth">
<action android:name="android.intent.action.VIEW"/>
Expand Down
13 changes: 12 additions & 1 deletion lib/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,21 @@ class AppRouter extends _$AppRouter {
class MyRouteObserver extends AutoRouterObserver {
@override
void didPush(Route route, Route? previousRoute) {
log.fine('New route pushed: ${route.settings.name}, ${route.runtimeType}');
log.fine(
'New route pushed: ${route.settings.name}, ${route.runtimeType}, previous route: ${previousRoute?.settings.name}, ${previousRoute.runtimeType}');
log.fine('current route: ${appRouter.current.name}');
if (route.settings.name != null) {
route.navigator?.context.read<PlayerCubit>().showMiniPlayer();
}
super.didPush(route, previousRoute);
}

@override
void didPop(Route route, Route? previousRoute) {
log.fine(
'New route popped: ${route.settings.name}, ${route.runtimeType}, previous route: ${previousRoute?.settings.name}, ${previousRoute.runtimeType}');
log.fine('current route: ${appRouter.current.name}');
super.didPop(route, previousRoute);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.17.2+4036
version: 1.17.3+4037

environment:
sdk: '>=3.0.0 <4.0.0'
Expand Down

0 comments on commit 3c4b99c

Please sign in to comment.