Navigate To Flutter Page From player
Scenarios
Scenario 1
When users click the CTA, the default behavior is rendering the CTA link content using the native web view. But the host app developers may want to render the CTA link content using the Flutter page.
Scenario 2
When users click the cart icon, the host app may want to navigate the custom Flutter cart page.
Issues
Both the CTA button and cart icon belong to the video player. There are similar issues in these two scenarios. As follows, when the video player is launched, the Flutter navigation stack is covered by the video player.
![](https://docs.firework.com/~gitbook/image?url=https%3A%2F%2F688917408-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-MLoGG8m6bokS9YTmS7m%252Fuploads%252FT0AEDb6wJNxKuWbTeTtV%252Fflutter_stack.png%3Falt%3Dmedia%26token%3D6051dd2f-ecb9-48bb-824c-5b8208767177&width=768&dpr=4&quality=100&sign=9468badf&sv=1)
And when the host app developers use Navigator.of(context).pushNamed
to navigate the Flutter page, the page will be rendered in the bottom Flutter navigation stack. Therefore, the new Flutter page would be covered by the video player(native page).
Solution
Start floating player
If the floating player is enabled, the host app could start the floating player when users click the CTA button or the cart icon.
Start floating player when users click the CTA button
Start floating player when users click the cart icon
Last updated