blackmann / story_view

Story view for apps with stories.
BSD 3-Clause "New" or "Revised" License
417 stars 342 forks source link

First item is getting played thrice #156

Closed rahuldubey093 closed 1 year ago

rahuldubey093 commented 1 year ago

Hello,

Whenever I open the stories, the first story's onStoryShow: (StoryItem storyItem) {} is called 3 times. It happens for whichever story you open for the first time, from the second story onwards, it's called single time only.

I have checked the parent widgets, they are never being called 3 times, it's only happening inside onStoryShow() callback. Also, I have checked the solution in https://github.com/blackmann/story_view/issues/14 but I am already following the same practice of defining the storyItems in initstate.

Here are some logs with timestamps: flutter: onStoryShow() -> storyID: 18. timestamp: 2023-01-07 16:10:02.302414. flutter: onStoryShow() -> storyID: 18. timestamp: 2023-01-07 16:10:02.359484. flutter: onStoryShow() -> storyID: 18. timestamp: 2023-01-07 16:10:02.600755.

Please help.

rahuldubey093 commented 1 year ago

I have found the solution to this. First of all, my apologies, the issue is not with the plugin. But I had a Hero widget as a parent, and though I tested the parent widgets, the Hero widget somehow got missed and it's the one getting called 3 times.