Visitar URL original
Make sure that a CircleAvatar doesn't crash in 0x0 environment (#173498) · flutter/flutter@559da1f · GitHub
Skip to content

Commit 559da1f

Browse files
authored
Make sure that a CircleAvatar doesn't crash in 0x0 environment (#173498)
This is my attempt to handle #6537 for the CircleAvatar UI control.
1 parent b152ced commit 559da1f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎packages/flutter/test/material/circle_avatar_test.dart‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,14 @@ void main() {
316316
expect(paragraph.text.style!.color, equals(theme.primaryTextTheme.titleLarge!.color));
317317
});
318318
});
319+
320+
testWidgets('CircleAvatar renders at zero area', (WidgetTester tester) async {
321+
await tester.pumpWidget(
322+
const MaterialApp(
323+
home: SizedBox.shrink(child: CircleAvatar(child: Text('X'))),
324+
),
325+
);
326+
});
319327
}
320328

321329
Widget wrap({required Widget child}) {

0 commit comments

Comments
 (0)