..
This commit is contained in:
@ -6,8 +6,13 @@ import 'package:f0ckapp/controller/settingscontroller.dart';
|
||||
|
||||
class VideoControlsOverlay extends StatefulWidget {
|
||||
final CachedVideoPlayerPlusController controller;
|
||||
final VoidCallback? onDoubleTap;
|
||||
|
||||
const VideoControlsOverlay({super.key, required this.controller});
|
||||
const VideoControlsOverlay({
|
||||
super.key,
|
||||
required this.controller,
|
||||
this.onDoubleTap,
|
||||
});
|
||||
|
||||
@override
|
||||
State<VideoControlsOverlay> createState() => _VideoControlsOverlayState();
|
||||
@ -140,27 +145,9 @@ class _VideoControlsOverlayState extends State<VideoControlsOverlay> {
|
||||
AnimatedOpacity(
|
||||
opacity: _controlsVisible && !_isScrubbing ? 1.0 : 0.0,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
child: IgnorePointer(
|
||||
ignoring: !_controlsVisible,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
widget.controller.value.isPlaying
|
||||
? Icons.pause
|
||||
: Icons.play_arrow,
|
||||
size: 64,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
onPressed: _handlePlayPause,
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: _buildBottomBar(),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: _buildBottomBar(),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -208,6 +195,18 @@ class _VideoControlsOverlayState extends State<VideoControlsOverlay> {
|
||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
widget.controller.value.isPlaying
|
||||
? Icons.pause
|
||||
: Icons.play_arrow,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
size: 20,
|
||||
),
|
||||
onPressed: _handlePlayPause,
|
||||
constraints: const BoxConstraints(),
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
Text(
|
||||
_formatDuration(widget.controller.value.position),
|
||||
style: TextStyle(
|
||||
|
Reference in New Issue
Block a user