diff --git a/packages/flutter/test/cupertino/scrollbar_test.dart b/packages/flutter/test/cupertino/scrollbar_test.dart index bec7944cecb..91ca7f42244 100644 --- a/packages/flutter/test/cupertino/scrollbar_test.dart +++ b/packages/flutter/test/cupertino/scrollbar_test.dart @@ -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); + }); }