fix(chat): remove remaining router Back interception

This commit is contained in:
2026-10-24 14:17:57 +01:00
parent 94ffe60d75
commit cf784245e8
4 changed files with 42 additions and 16 deletions
@@ -71,7 +71,7 @@ void main() {
router = AppRouterDelegate(
initial: AppRoute.chat,
cupertino: false,
onPopToChat: () => router.goTo(AppRoute.chat),
onPopToChat: () => fail('Chat Back must not use the router override'),
onPopToRuns: () {},
builder: (_, route) => AdaptiveShell(
destination: AppDestination.chat,
@@ -115,6 +115,14 @@ void main() {
isTrue,
reason: 'Chat must be pushed, not swapped into the main page',
);
expect(
find.byWidgetPredicate(
(widget) => widget is PopScope && !widget.canPop,
),
findsNothing,
reason:
'The main-screen Back interceptor must not block an open chat',
);
expect(
tester.widget<BackButton>(findNativeBack()).onPressed,
isNull,