// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.import'package:flutter/cupertino.dart';import'package:flutter_api_samples/cupertino/scrollbar/cupertino_scrollbar.1.dart'asexample;import'package:flutter_test/flutter_test.dart';voidmain(){testWidgets('List view displays CupertinoScrollbar',(WidgetTestertester)async{awaittester.pumpWidget(constexample.ScrollbarApp(),);expect(find.text('Item 0'),findsOneWidget);finalTestGesturegesture=awaittester.startGesture(tester.getCenter(find.byType(ListView)));awaitgesture.moveBy(constOffset(0.0,-100.0));awaittester.pumpAndSettle();expect(find.text('Item 0'),findsNothing);finalFinderscrollbar=find.byType(CupertinoScrollbar);expect(scrollbar,findsOneWidget);expect(tester.getTopLeft(scrollbar).dy,0.0);expect(tester.getBottomLeft(scrollbar).dy,600.0);});}