mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make sure that a Checkbox doesn't crash in 0x0 environment (#173178)
This is my attempt to handle https://github.com/flutter/flutter/issues/6537 for the Checkbox UI control.
This commit is contained in:
parent
2734643642
commit
a9be1dfab3
@ -2476,6 +2476,17 @@ void main() {
|
||||
);
|
||||
expect(getCheckboxRenderer(), paints..path(color: inactiveBackgroundColor));
|
||||
});
|
||||
|
||||
testWidgets('Checkbox renders at zero area', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const MaterialApp(
|
||||
home: Center(
|
||||
child: SizedBox.shrink(child: Scaffold(body: Checkbox(value: true, onChanged: null))),
|
||||
),
|
||||
),
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
}
|
||||
|
||||
class _SelectedGrabMouseCursor extends MaterialStateMouseCursor {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user