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

Commit f7d4977

Browse files
ahmedsameha1korca0220
authored andcommitted
Make sure that a CircleAvatar doesn't crash in 0x0 environment (flutter#173498)
This is my attempt to handle flutter#6537 for the CircleAvatar UI control.
1 parent 9755e7e commit f7d4977

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)