fix(app): remove every app-level system Back override

This commit is contained in:
2026-10-24 16:32:02 +01:00
parent 7bb95d4610
commit c6342ac6cc
12 changed files with 139 additions and 392 deletions
@@ -182,7 +182,9 @@ void main() {
expect(find.byKey(templateDetailKey), findsNothing);
});
testWidgets('native back returns to the gallery', (tester) async {
testWidgets('system Back is not intercepted by the open template', (
tester,
) async {
final gateway = GalleryGateway(
(type, fields) async => templatesReply(galleryTemplates),
);
@@ -192,11 +194,12 @@ void main() {
expect(find.byKey(templateDetailKey), findsOneWidget);
expect(selectableSource('blank'), findsOneWidget);
await tester.binding.handlePopRoute();
expect(find.byType(PopScope), findsNothing);
// Nothing is pushed, so Back is the platform's; the screen keeps no
// Back behavior of its own.
expect(await tester.binding.handlePopRoute(), isFalse);
await tester.pumpAndSettle();
expect(find.byKey(templatesGalleryKey), findsOneWidget);
expect(find.byKey(templateDetailKey), findsNothing);
expect(find.byKey(templateDetailKey), findsOneWidget);
});
testWidgets('embedded use drops the app bar and keeps native detail back', (