Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Suggestions #11

Open
Eimji opened this issue Oct 29, 2022 · 4 comments
Open

Suggestions #11

Eimji opened this issue Oct 29, 2022 · 4 comments

Comments

@Eimji
Copy link

Eimji commented Oct 29, 2022

Hello,

Thanks for your plugin.

May I suggest some features to allow fixed width and height instead of keeping of the device screen ratio? And could you please allow to put the floating widget anywhere instead of only the corners?

Thanks again.

@Eimji
Copy link
Author

Eimji commented Oct 30, 2022

I managed to add an option for fixed width and height. I'm working on another option for putting the floating widget anywhere.

I will make a PR later.

@sagnik-sanyal
Copy link

Hello @Eimji , i was using this package for pip view inside my application but the main problem that i was facing is that whenever the pip view is active , if we use the named routes that have already been declared in the onGenerateRoute callback of MaterialApp they simple throw an error. I was looking for the solution but didn't find any, a help would be very much appreciated .

@Eimji
Copy link
Author

Eimji commented Nov 21, 2022

Hello @sagnik-sanyal I think error may be due to the PIPView which uses its own Navigator:

Navigator(
    onGenerateInitialRoutes: (navigator, initialRoute) => [
          MaterialPageRoute(builder: (context) => _bottomWidget!),
     ],
 )

If you look at the source code, the trick is a Stack with 2 widgets: the first widget (the bottom widget) as a Navigator object and the second widget is the floating widget (the main widget which will be PiPed).
I think you should define some option to include onGenerateRoute inside this navigator, not in the MaterialApp.
I'm also working on a similar feature (I want to keep my route stack independenty on the state of the top widget (PiPed or expanded)

@sagnik-sanyal
Copy link

sagnik-sanyal commented Nov 28, 2022

Thanks for helping me out , if you are able to keep your route stack independent pls lemme know. The issue lies that the material navigator stack and the pip view navigator stack are conflicting.

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

No branches or pull requests

2 participants