'Cannot switch YouTube video to fullscreen in Flutter

I have a Flutter web app which contains a feed with a list of posts, some of them with YT video. I use YT video widget for this. When I switch video to full screen Flutter calls build() method of the top most widget which contains the list which is then reloaded, redisplayed and full screen in efectively closed. When I navigate to post details and display the YT video widget on post detail screen fullscreen works as expected, but still the list is reloaded on background in it's build() method, but as the main screen is replaced with the detail screen, fullscreen works.

It seems strange, I don't understand why Flutter calls the build() method when switching to full screen.

Does anyone know how to handle full screen properly? Or how to set up Flutter app?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source