Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/flutter/test/material/bottom_sheet_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2889,6 +2889,24 @@ void main() {
expect(FocusScope.of(tester.element(find.text('BottomSheet'))).hasFocus, false);
expect(focusNode.hasFocus, true);
});

testWidgets('BottomSheet does not crash at zero area', (WidgetTester tester) async {
await tester.pumpWidget(
MaterialApp(
home: Scaffold(
body: Center(
child: SizedBox.shrink(
child: BottomSheet(
onClosing: () {},
builder: (BuildContext context) => const Text('X'),
),
),
),
),
),
);
expect(tester.getSize(find.byType(BottomSheet)), Size.zero);
});
}

class _TestPage extends StatelessWidget {
Expand Down