neeko
neeko copied to clipboard
Hide back button on player
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, ),
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)
...
This a way to do that. However, how control the visibility of landscape backButton