mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make sure that a CupertinoListSection doesn't crash in 0x0 environment (#179068)
This is my attempt to handle https://github.com/flutter/flutter/issues/6537 for the CupertinoListSection widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com> Co-authored-by: Victor Sanni <victorsanniay@gmail.com>
This commit is contained in:
parent
4e113f9420
commit
5266539cfb
@ -258,4 +258,15 @@ void main() {
|
||||
offsetMoreOrLessEquals(const Offset(margin, 41 + margin), epsilon: 1),
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('CupertinoListSection does not crash at zero area', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const CupertinoApp(
|
||||
home: Center(
|
||||
child: SizedBox.shrink(child: CupertinoListSection(header: Text('X'))),
|
||||
),
|
||||
),
|
||||
);
|
||||
expect(tester.getSize(find.byType(CupertinoListSection)), Size.zero);
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user