Open CaoGiaHieu-dev opened 2 weeks ago
it work fine if i use
context.pop();
WidgetsBinding.instance.endOfFrame.whenComplete(() {
context.pop();
WidgetsBinding.instance.endOfFrame.whenComplete(() {
const ChatRoute().go(context);
});
});
Thanks for the report. I was able to replicate the reported behavior / exception.
Any update one this issue ?
Steps to reproduce
Create router follow this
Navigate to Routes.postDetail with JobsExtra $extra and using go to Routes.chat by const ChatRoute().go(context);
Expected results
Navigate success
Actual results
got error type 'Null' is not a subtype of type 'JobsExtra' in type cast
Code sample
Code sample
```dart // create router @TypedStatefulShellRouteScreenshots or Video
Screenshots / Video demonstration
[Upload media here]Logs
Logs
```console #4 GoRouterDelegate._callOnExitStartsAt.handleOnExitResult (package:go_router/src/delegate.dart:275:16) delegate.dart:275 #5 GoRouterDelegate._callOnExitStartsAt (package:go_router/src/delegate.dart:290:14) delegate.dart:290 #6 GoRouterDelegate.setNewRoutePath (package:go_router/src/delegate.dart:232:16) delegate.dart:232 #7 _RouterState._processParsedRouteInformation.Flutter Doctor output
Doctor output
```console flutter doctor -v [✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-x64, locale vi) • Flutter version 3.19.6 on channel stable at /Users/caogiahieu/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 54e66469a9 (9 days ago), 2024-04-17 13:08:03 -0700 • Engine revision c4cd48e186 • Dart version 3.3.4 • DevTools version 2.31.1 [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/caogiahieu/Library/Android/sdk • Platform android-34, build-tools 31.0.0 • ANDROID_HOME = /Users/caogiahieu/Library/Android/sdk • ANDROID_SDK_ROOT = /Users/caogiahieu/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2 [✓] Android Studio (version 2023.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.9+0-17.0.9b1087.7-11185874) [✓] VS Code (version 1.88.1) • VS Code at /Users/caogiahieu/Applications/Visual Studio Code.app/Contents • Flutter extension version 3.86.0 [✓] Connected device (1 available) • iPhone của Cao Gia Hieu (mobile) • e3010bcca1500cf8a43f8baba42c0d712114c722 • ios • iOS 16.7.7 20H330 [✓] Network resources • All expected network resources are available. • No issues found! ```