Open lizhuoyuan opened 11 months ago
If I use context.go, I can jump to the home page, but in this case I don't know how to call the afterlogin method.
Hi @lizhuoyuan. Thanks for filing this. This seems to be an issue with implementation and can't seem to point out the exact issue. Can you check out the sample in https://github.com/flutter/flutter/issues/122038#issue-1612087725 to see if it helps provide more insight?
Hi @lizhuoyuan. Thanks for filing this. This seems to be an issue with implementation and can't seem to point out the exact issue. Can you check out the sample in https://github.com/flutter/flutter/issues/122038#issue-1612087725 to see if it helps provide more insight?
Hi @lizhuoyuan. Thanks for filing this. This seems to be an issue with implementation and can't seem to point out the exact issue. Can you check out the sample in #122038 (comment) to see if it helps provide more insight?
Thanks, I checked that question, but the situation is different from mine. My request is to jump to the ShellRoute page and call the page's method to process the passed parameters, but go will not go through the life cycle, except build, but there is no such thing in the build. It is suitable for calling methods because it may lead to repeated builds and push cannot switch routes.
Thanks for your response. I can reproduce this on the latest master
channel as well.
``` [!] Flutter (Channel master, 3.17.0-5.0.pre.64, on macOS 14.0 23A344 darwin-arm64, locale en-NG) • Flutter version 3.17.0-5.0.pre.64 on channel master at /Users/damilolaalimi/fvm/versions/master ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.1.5/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/damilolaalimi/fvm/versions/master. Consider adding /Users/damilolaalimi/fvm/versions/master/bin to the front of your path. • Upstream repository https://github.com/flutter/flutter.git • Framework revision 2e088178e8 (7 hours ago), 2023-11-12 18:45:26 -0500 • Engine revision a18ee3c7f5 • Dart version 3.3.0 (build 3.3.0-120.0.dev) • DevTools version 2.30.0-dev.1 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades. [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/damilolaalimi/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = /Users/damilolaalimi/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15A507 • CocoaPods version 1.12.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [!] Android Studio (version unknown) • Android Studio at /Users/damilolaalimi/Downloads/Android Studio Preview.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart ✗ Unable to determine Android Studio version. • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314) [✓] VS Code (version 1.84.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.50.0 [✓] VS Code (version 1.83.1) • VS Code at /Users/damilolaalimi/Downloads/Visual Studio Code.app/Contents • Flutter extension version 3.50.0 [✓] Connected device (4 available) • Damilola’s iPhone (mobile) • 00008110-001964480AE1801E • ios • iOS 17.0.2 21A351 • iPhone 14 Pro (mobile) • 6548B0D1-7674-4306-9852-198C465F1104 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 14.0 23A344 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 119.0.6045.123 [✓] Network resources • All expected network resources are available. ! Doctor found issues in 2 categories. ```
may have the same root cause https://github.com/flutter/flutter/issues/111842
This issue is marked P1 but has had no recent status updates.
The P1 label indicates high-priority issues that are at the top of the work list. This is the highest priority level a bug can have if it isn't affecting a top-tier customer or breaking the build. Bugs marked P1 are generally actively being worked on unless the assignee is dealing with a P0 bug (or another P1 bug). Issues at this level should be resolved in a matter of months and should have monthly updates on GitHub.
Please consider where this bug really falls in our current priorities, and label it or assign it accordingly. This allows people to have a clearer picture of what work is actually planned. Thanks!
This issue is assigned to @chunhtai but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
Is there an existing issue for this?
Steps to reproduce
Expected results
Jump to the homepage and call the afterLogin method
Actual results
nothing happened
Code sample
Code sample
```dart // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; final GlobalKeyScreenshots or Video
Screenshots / Video demonstration
https://github.com/flutter/flutter/assets/15923901/4b9cdebb-829f-43e6-acc8-89d792648de6Logs
Logs
```console Performing hot restart... Syncing files to device Pixel 7 Pro... Restarted application in 1,094ms. [GoRouter] Full paths for routes: => /a => /b => /login known full paths for route names: a => /a login => /login I/flutter (31485): login success :false [GoRouter] setting initial location /a [GoRouter] Using MaterialApp configuration [GoRouter] pushing /login [GoRouter] getting location for name: "a", queryParameters: {login: true} [GoRouter] pushing /a?login=true [GoRouter] getting location for name: "a", queryParameters: {login: true} [GoRouter] pushing /a?login=true [GoRouter] getting location for name: "a", queryParameters: {login: true} [GoRouter] pushing /a?login=true [GoRouter] getting location for name: "a", queryParameters: {login: true} [GoRouter] pushing /a?login=true [GoRouter] getting location for name: "a", queryParameters: {login: true} [GoRouter] pushing /a?login=true [GoRouter] getting location for name: "a", queryParameters: {login: true} [GoRouter] pushing /a?login=true ```Flutter Doctor output
Doctor output
```console flutter doctor -v [✓] Flutter (Channel stable, 3.13.9, on macOS 14.0 23A344 darwin-x64, locale zh-Hans-CN) • Flutter version 3.13.9 on channel stable at /Users/lizhuoyuan/fvm/versions/stable • Upstream repository https://github.com/flutter/flutter.git • Framework revision d211f42860 (2 weeks ago), 2023-10-25 13:42:25 -0700 • Engine revision 0545f8705d • Dart version 3.1.5 • DevTools version 2.25.0 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/lizhuoyuan/Library/Android/sdk • Platform android-33, build-tools 30.0.3 • ANDROID_HOME = /Users/lizhuoyuan/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15A507 • CocoaPods version 1.12.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • android-studio-dir = /Applications/Android Studio.app • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231) [✓] VS Code (version 1.83.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.74.0 [✓] Connected device (2 available) • Pixel 7 Pro (mobile) • 2A111FDH3006NG • android-arm64 • Android 14 (API 34) • Chrome (web) • chrome • web-javascript • Google Chrome 119.0.6045.105 [✓] Network resources • All expected network resources are available. • No issues found! ```