neeko icon indicating copy to clipboard operation
neeko copied to clipboard

Hide back button on player

Open ZMChoo opened this issue 5 years ago • 2 comments

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 avatar Jan 20 '20 03:01 ZMChoo

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) ...

ZMChoo avatar Jan 20 '20 04:01 ZMChoo

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

JarvanMo avatar Jan 21 '20 02:01 JarvanMo