fix(nav): preserve HTPC escape behavior

Use Flutter's supported desktop application-exit API so the second root Back press closes Plezy on Windows. Preserve fullscreen when video player navigation is enabled while keeping fullscreen-first Escape behavior for normal desktop use.

close #1582
This commit is contained in:
edde746
2026-07-16 20:43:10 +02:00
parent a244d249bd
commit 6df8aba097
5 changed files with 94 additions and 10 deletions
+24
View File
@@ -0,0 +1,24 @@
import 'dart:ui' as ui;
import 'package:flutter_test/flutter_test.dart';
import 'package:plezy/services/app_exit_service.dart';
void main() {
test('desktop exit uses the required application exit API', () async {
ui.AppExitType? requestedType;
int? requestedCode;
expect(
await AppExitService.requestExit(
exitApplicationForTesting: (exitType, exitCode) async {
requestedType = exitType;
requestedCode = exitCode;
return ui.AppExitResponse.exit;
},
),
isTrue,
);
expect(requestedType, ui.AppExitType.required);
expect(requestedCode, 0);
});
}