fix(app): remove every app-level system Back override
This commit is contained in:
@@ -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', (
|
||||
|
||||
Reference in New Issue
Block a user