mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make sure that a GridPaper doesn't crash in 0x0 environment (#180906)
This is my attempt to handle https://github.com/flutter/flutter/issues/6537 for the GridPaper widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
This commit is contained in:
parent
a5f4d392a5
commit
3f9dff2a8e
@ -14,4 +14,14 @@ void main() {
|
||||
final List<Layer> layers2 = tester.layers;
|
||||
expect(layers1, equals(layers2));
|
||||
});
|
||||
|
||||
testWidgets('GridPaper does not crash at zero area', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Center(child: SizedBox.shrink(child: GridPaper())),
|
||||
),
|
||||
);
|
||||
expect(tester.getSize(find.byType(GridPaper)), Size.zero);
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user