Remove Uri from _launchedFromWidget #296
-
So i have been confusing from this _launchedFromWidget Uri. when ever i click the widget from home screen and open app, It will redirect to home view first then to detail. After i went back to home and go to another pages and back to the home page. It will redirect again to detail again. Here's the video off the footage: Footage.of.Home.Widget.mp4](url) and here's my home_view.dart code:
Is there any solution to remove the Uri object after i clicked the home widget? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
I think there might be two ways:
For context:
When your app is already running HomeWidget exposes a Stream that will be invoked once per click event (but doesn't capture the initial launch) |
Beta Was this translation helpful? Give feedback.
Hmmm, in that case I think your other Widget configuration is at fault here. You should move the check/listener to a place where it is called once and not creating too many rebuilds.
Alternatively you could store somewhere in your App's state whether you checked for the initial launch in that session.
As described above there is no way for home_widget to clear that data as it is nested in how the app was started