Skip to content

Commit f311a23

Browse files
Make sure that a RadioListTile doesn't crash in 0x0 environment (flutter#177576)
This is my attempt to handle flutter#6537 for the RadioListTile widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
1 parent 9c056ed commit f311a23

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/flutter/test/material/radio_list_tile_test.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,4 +2307,15 @@ void main() {
23072307
final Radio<bool> radio = tester.widget(find.byType(Radio<bool>));
23082308
expect(radio.innerRadius, innerRadius);
23092309
});
2310+
2311+
testWidgets('RadioListTile does not crash at zero area', (WidgetTester tester) async {
2312+
await tester.pumpWidget(
2313+
const MaterialApp(
2314+
home: Scaffold(
2315+
body: Center(child: SizedBox.shrink(child: RadioListTile<bool>(value: true))),
2316+
),
2317+
),
2318+
);
2319+
expect(tester.getSize(find.byType(RadioListTile<bool>)), Size.zero);
2320+
});
23102321
}

0 commit comments

Comments
 (0)