mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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:
parent
b152cedae7
commit
559da1fd76
@ -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}) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user