feat(player): toggle playback on a two-finger tap without raising the chrome

A touch viewer had to raise the chrome to pause, which dims the picture and
covers the subtitle line they were trying to finish reading. A two-finger tap
now toggles playback with the chrome left down, so the frame that pauses is the
frame that was on screen. It fires the moment the chord resolves, in every
player state.

The two-finger double tap no longer resets the video zoom. Keeping it would mean
holding this toggle back for the double-tap window before acting, and pausing
late is pausing on the wrong frame. Zoom reset stays in the video settings sheet,
its presets and the keyboard shortcut, and pinching back to 100% now snaps
exactly within three percent so touch has a one-gesture path too.

Both chord actions share _mobileTouchGesturesAllowed, so the chord is inert
under screen lock, in PiP and while the content strip is open; the zoom reset
previously fired straight through a locked screen.

close #1505
This commit is contained in:
edde746
2026-08-03 00:04:03 +02:00
parent 9c08c78f6d
commit fb0613e3db
10 changed files with 645 additions and 152 deletions
-13
View File
@@ -15,19 +15,6 @@ final _allowedDiagnostics = <AnalyzerDiagnostic>{
length: 4,
message: "Missing an 'await' for the 'Future' computed by this expression.",
),
const AnalyzerDiagnostic(
severity: 'INFO',
type: 'HINT',
code: 'UNNECESSARY_IMPORT',
path: 'test/widgets/video_controls_two_finger_double_tap_tracker_test.dart',
line: 1,
column: 8,
length: 31,
message:
"The import of 'package:flutter/material.dart' is unnecessary because "
'all of the used elements are also provided by the import of '
"'package:flutter_test/flutter_test.dart'.",
),
};
Future<void> main() async {