Closed dario-digregorio closed 1 month ago
Thanks for reaching out! I hope I support help you with the integration of Wiredash into your app.
Without any code I can only guess what could cause the router to reset the state
Please place your router in a StatefulWidget
. All widgets below Wiredash rebuild. You lose state when your router
is in a StatelessWidget
as suggested by the auto_route
package
class App extends StatelessWidget {
// MISTAKE! this does not keep state at rebuild. Make App a StatefulWidget
final _appRouter = AppRouter();
@override
Widget build(BuildContext context){
return MaterialApp.router(
routerConfig: _appRouter.config(),
);
}
}
Checkout https://github.com/wiredashio/wiredash-sdk/issues/337#issuecomment-1985887521 for more information
Please read #289 and check that you're not running into any problem with any FutureBuilder
in your app.
Let me know how it goes 😄
Okay my bad. It seems like I have misconfigured the deeplinking logic. First of all Wiredash triggers a deeplink routing and instead of returning the passed deepLink Object, I returned DeepLink.defaultPath
which just pushes a new route.
config = AppRouter().config(
deepLinkBuilder: (deepLink) {
// This is correct
return deepLink;
// This is wrong
// return DeepLink.defaultPath;
},
);
I close the issue.
BTW I love your package. Very clean and simple DX and APIs! :)
Describe the bug I am currently facing a bug when starting and closing feedback. It seems like when opening/closing the feedback there get multiple routes pushed. I am using the default Wiredash configuration and I am also using the auto_route library for Routing. See the video. If needed I can create a example repo.
Wiredash SDK Info wiredash: ^2.2.2 with flutter
auto_route: ^9.2.2
Flutter SDK
Flutter doctor
```bash flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348 darwin-arm64, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc3) [✓] Xcode - develop for iOS and macOS (Xcode 16.0) [✓] Chrome - develop for the web [✓] Android Studio (version 2024.1) [✓] VS Code (version 1.94.2) [✓] Connected device (5 available) [✓] Network resources ```Screenshots https://github.com/user-attachments/assets/244febac-9bd7-4f54-9b61-0868f4fd2777