frosty
frosty copied to clipboard
Minimizing mode
PIP MODE IN THE APP
Although pip mode was implemented for the Android app. It was missing the mini video mode which is available in the Twitch app.
This is a quality-of-life update to the app.
Feature implemented:
https://user-images.githubusercontent.com/62815232/234139292-ad15cf5f-a915-4fd8-9e46-0f413ddc3674.mp4
Feature in the app:
https://user-images.githubusercontent.com/62815232/234141158-956adaa0-b0f2-4fec-98c1-b5d4a6001f44.mp4
Changes made and How it is implemented:
- To implement this feature I added a new custom route that allows you to overlay the route.
- It is under the widgets folder named translucent_overlay_route.dart.
- Added a miniVedioMode variable to the video store and regenerated the stores.
- When the user drags down on the video, on_drag_end enables the mini-video mode.
- While in mini video mode when a user taps on the video it goes back to the full screen.
- Finally, while in mini video mode if the user drags horizontally it closes the video component(pops it).
- Finally, before a new video is pushed to the navigator all the routes are poped till the current route.
- This is used for all the routes that use VedioChat, I also implemented this for CategoryStreams to close any current running video before showing CategoryStreams.
Additional info:
This method does not interfere with the default pip mode for Android it still works even if the app is in mini video mode.
I have never worked with Flutter before so it is completely understandable to reject this feature update. I was unable to implement the hero widget animation for an additional sliding effect between full view and mini view.
Possible breaking change:
For some reason when I ran it. The SentryFlutter required DSN in its options as well. For now, I have added an empty string, as I don't know what this component of the app does. I highly recommend looking into it if you plan to use this code. It can be found at main.dart line 50.