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

Hide back button on player #9

Open
ZMChoo opened this issue Jan 20, 2020 · 2 comments
Open

Hide back button on player #9

ZMChoo opened this issue Jan 20, 2020 · 2 comments

Comments

@ZMChoo
Copy link

ZMChoo commented Jan 20, 2020

Hi, anyone else knows how to hide the back button on the player?

The way how I use the plugin was like this

NeekoPlayerWidget( onSkipPrevious: () { print("previous"); _videoControllerWrapper.prepareDataSource(DataSource.network( "https://.......video........mp4")); }, onSkipNext: () { print("next"); _videoControllerWrapper.prepareDataSource(DataSource.network( "https://.......video........mp4")); }, videoControllerWrapper: _videoControllerWrapper, ),

@ZMChoo
Copy link
Author

ZMChoo commented Jan 20, 2020

I have fixed this by manually change the plugin code, not sure is this the right way.

Firstly I added final bool showBackButton; and
const NeekoPlayerOptions(
...
...
this.showBackButton = true,
...
...
);

in neeko_player_options.dart file

After that, add
void pushFullScreenWidget() {
...
playerOptions: NeekoPlayerOptions(
...
showBackButton: widget.playerOptions.showBackButton,
...
...
}

and change
if (widget.playerOptions.useController)
Positioned(
child: TopBar(
...
to
if (widget.playerOptions.useController && widget.playerOptions.showBackButton)
Positioned(
child: TopBar(
...

in neeko_player_widget.dart file

Lastly, plugin usage:
NeekoPlayerWidget(
playerOptions: NeekoPlayerOptions(showBackButton: false)
...

@JarvanMo
Copy link
Member

This a way to do that. However, how control the visibility of landscape backButton

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