You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm implementing custom controls widget, it worked fine but the problem is that the custom controls are stuck on screen (always visible), unlike the default material or cupertino controls which visibility can be toggled.
this is my player:
`
BetterPlayerController? _betterPlayerController;
i'm implementing custom controls widget, it worked fine but the problem is that the custom controls are stuck on screen (always visible), unlike the default material or cupertino controls which visibility can be toggled.
this is my player:
`
BetterPlayerController? _betterPlayerController;
@OverRide
void initState() {
_betterPlayerController = BetterPlayerController(
BetterPlayerConfiguration(
controlsConfiguration: BetterPlayerControlsConfiguration(
playerTheme: BetterPlayerTheme.custom,
customControlsBuilder: (controller, onControlsVisibilityChanged) =>
// I believe onControlsVisibilityChanged is responsible for visibility toggle
CustomControlsWidget(
controller: controller,
onControlsVisibilityChanged: onControlsVisibilityChanged),
),
),
//dataSource etc...
);
}
@OverRide
Widget build(BuildContext context) {
final provider = Provider.of(context);
final seriesVideo = provider.seriesVideo;
final mediaQuery = MediaQuery.sizeOf(context);
print(mediaQuery.width);
}
`
this is my custom controls widget:
`class CustomControlsWidget extends StatefulWidget {
final BetterPlayerController? controller;
final Function(bool visbility)? onControlsVisibilityChanged;
const CustomControlsWidget(
{super.key, this.controller, this.onControlsVisibilityChanged});
@OverRide
State createState() => _CustomControlsWidgetState();
}
class _CustomControlsWidgetState extends State {
@OverRide
Widget build(BuildContext context) {
widget.onControlsVisibilityChanged;
}
}
`
this is player screen:
The text was updated successfully, but these errors were encountered: