Scroll details dialogs whose content is taller than the app

Chat details was cut off at 1280x800 (found by run 305's UI review).
This commit is contained in:
2026-11-10 22:21:14 +00:00
parent 75a61dbd8c
commit ba1cbccdf2
2 changed files with 49 additions and 2 deletions
+45
View File
@@ -113,6 +113,51 @@ void main() {
expect(find.text('Details body'), findsOneWidget);
});
testWidgets('wide: details taller than the app scroll inside the dialog', (
tester,
) async {
_size(tester, const Size(1280, 600));
await tester.pumpWidget(
MaterialApp(
home: Builder(
builder: (context) => TextButton(
onPressed: () => showAppDetails<void>(
context,
builder: (_) => Column(
mainAxisSize: MainAxisSize.min,
children: [
for (var i = 0; i < 30; i++)
SizedBox(height: 48, child: Text('Row $i')),
],
),
),
child: const Text('Open'),
),
),
),
);
await tester.tap(find.text('Open'));
await tester.pumpAndSettle();
expect(tester.takeException(), isNull);
final dialog = tester.getRect(
find
.descendant(of: find.byType(Dialog), matching: find.byType(Material))
.first,
);
expect(dialog.height, lessThanOrEqualTo(600 * 0.85));
await tester.scrollUntilVisible(
find.text('Row 29'),
200,
scrollable: find
.descendant(
of: find.byType(Dialog),
matching: find.byType(Scrollable),
)
.first,
);
expect(find.text('Row 29').hitTestable(), findsOneWidget);
});
testWidgets('phone: both are bottom sheets', (tester) async {
_size(tester, const Size(430, 900));
final picked = <String>[];