Make sure that a CircleAvatar doesn't crash in 0x0 environment (#173498)

This is my attempt to handle
https://github.com/flutter/flutter/issues/6537 for the CircleAvatar UI
control.
This commit is contained in:
Ahmed Mohamed Sameh 2025-08-20 21:42:39 +03:00 committed by GitHub
parent b152cedae7
commit 559da1fd76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -316,6 +316,14 @@ void main() {
expect(paragraph.text.style!.color, equals(theme.primaryTextTheme.titleLarge!.color));
});
});
testWidgets('CircleAvatar renders at zero area', (WidgetTester tester) async {
await tester.pumpWidget(
const MaterialApp(
home: SizedBox.shrink(child: CircleAvatar(child: Text('X'))),
),
);
});
}
Widget wrap({required Widget child}) {