Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initState not called in the Widget used in DetailScreen #12

Open
Shajeel-Afzal opened this issue Apr 19, 2020 · 1 comment
Open

initState not called in the Widget used in DetailScreen #12

Shajeel-Afzal opened this issue Apr 19, 2020 · 1 comment

Comments

@Shajeel-Afzal
Copy link

Hi,

I am using ResponsiveListScaffold.builder to show lists on the left and once the user selects a list item on the left I show the Video View on the right.

I am facing a problem right now with that the initState function. It is not being called once I select a different list item from the left.

Since we initialize the Video Player inside the initState, the detail screen keep playing the old video, however, the other content (Text Widgets etc) is changed since they are being used in the build function.

Is there any solution to manually call initState of the detail screen once user select the item from the itemBuilder

Thanks.

@awhitford
Copy link

I may have had a similar issue and resolved it by ensuring that the Detail screen had a different Key specified so that Flutter knows that the Details changed and needs to be rebuilt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants