mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Make sure that a CupertinoScrollbar doesn't crash in 0x0 environment (#179442)
This is my attempt to handle https://github.com/flutter/flutter/issues/6537 for the CupertinoScrollbar widget. Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
This commit is contained in:
parent
dcf78a0889
commit
2a88fa0f23
@ -1347,4 +1347,15 @@ void main() {
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('CupertinoScrollbar does not crash at zero area', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const CupertinoApp(
|
||||
home: Center(
|
||||
child: SizedBox.shrink(child: CupertinoScrollbar(child: CustomScrollView())),
|
||||
),
|
||||
),
|
||||
);
|
||||
expect(tester.getSize(find.byType(CupertinoScrollbar)), Size.zero);
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user