This commit is contained in:
@ -34,20 +34,21 @@ class _VideoControlsOverlayState extends State<VideoControlsOverlay> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _handleDoubleTap(TapDownDetails details) {
|
void _handleDoubleTap(TapDownDetails details) {
|
||||||
final screenWidth = MediaQuery.of(context).size.width;
|
final double screenWidth = MediaQuery.of(context).size.width;
|
||||||
final isRewind = details.globalPosition.dx < screenWidth / 2;
|
final bool isRewind = details.globalPosition.dx < screenWidth / 2;
|
||||||
|
widget.onOverlayTap();
|
||||||
|
|
||||||
Future(() {
|
Future(() {
|
||||||
if (isRewind) {
|
if (isRewind) {
|
||||||
final newPosition =
|
final Duration newPosition =
|
||||||
widget.controller.value.position - const Duration(seconds: 10);
|
widget.controller.value.position - const Duration(seconds: 10);
|
||||||
widget.controller.seekTo(
|
widget.controller.seekTo(
|
||||||
newPosition < Duration.zero ? Duration.zero : newPosition,
|
newPosition < Duration.zero ? Duration.zero : newPosition,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
final newPosition =
|
final Duration newPosition =
|
||||||
widget.controller.value.position + const Duration(seconds: 10);
|
widget.controller.value.position + const Duration(seconds: 10);
|
||||||
final duration = widget.controller.value.duration;
|
final Duration duration = widget.controller.value.duration;
|
||||||
widget.controller.seekTo(
|
widget.controller.seekTo(
|
||||||
newPosition > duration ? duration : newPosition,
|
newPosition > duration ? duration : newPosition,
|
||||||
);
|
);
|
||||||
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.4.2+63
|
version: 1.4.3+64
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.9.0-100.2.beta
|
sdk: ^3.9.0-100.2.beta
|
||||||
|
Reference in New Issue
Block a user