Close the phone chat page explicitly from its Back button
The chat page's Back had no handler and relied on the stock Back popping the nearest route, while the system gesture went through the app's own back handling. Back now pops the page's own route (or leaves the open chat), the same path the gesture takes.
This commit is contained in:
@@ -178,11 +178,13 @@ void main() {
|
||||
await tester.tap(find.text('Chat a').first);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byTooltip('Back').hitTestable(), findsOneWidget);
|
||||
// The page's Back closes that page explicitly rather than popping
|
||||
// whichever route is nearest the button.
|
||||
expect(
|
||||
tester
|
||||
.widget<BackButton>(find.byType(BackButton).hitTestable())
|
||||
.onPressed,
|
||||
isNull,
|
||||
isNotNull,
|
||||
);
|
||||
final stateA = tester.state(_thread('a'));
|
||||
await tester.enterText(_input('a'), 'Phone draft A');
|
||||
|
||||
Reference in New Issue
Block a user