fix(app): remove every app-level system Back override
This commit is contained in:
@@ -73,8 +73,6 @@ void main() {
|
||||
router = AppRouterDelegate(
|
||||
initial: AppRoute.chat,
|
||||
cupertino: false,
|
||||
onPopToChat: () => fail('Chat Back must not use the router override'),
|
||||
onPopToRuns: () {},
|
||||
builder: (_, route) => AdaptiveShell(
|
||||
destination: AppDestination.chat,
|
||||
destinationBodies: {
|
||||
@@ -155,14 +153,11 @@ void main() {
|
||||
expect(router.route, AppRoute.chat);
|
||||
expect(find.text('Scroll and return'), findsOneWidget);
|
||||
expect(find.byKey(const ValueKey('chat-thread-s')), findsNothing);
|
||||
expect(find.text('Press back again to close'), findsNothing);
|
||||
expect(exits, isEmpty);
|
||||
await tester.binding.handlePopRoute();
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Press back again to close'), findsOneWidget);
|
||||
expect(exits, isEmpty);
|
||||
// At the main screen Back is the platform's: no exit prompt.
|
||||
await tester.binding.handlePopRoute();
|
||||
await tester.pump();
|
||||
expect(find.text('Press back again to close'), findsNothing);
|
||||
expect(exits, ['SystemNavigator.pop']);
|
||||
await tester.pumpWidget(const SizedBox.shrink());
|
||||
disposeRouter();
|
||||
|
||||
Reference in New Issue
Block a user