@@ -362,6 +362,7 @@ void main() {
362362
363363 testWidgets ('Scrollbar widget properties take priority over theme' , (WidgetTester tester) async {
364364 const double thickness = 4.0 ;
365+ const double edgeMargin = 2.0 ;
365366 const bool showTrackOnHover = true ;
366367 const Radius radius = Radius .circular (3.0 );
367368 final ScrollController scrollController = ScrollController ();
@@ -394,14 +395,14 @@ void main() {
394395 find.byType (Scrollbar ),
395396 paints..rrect (
396397 rrect: RRect .fromRectAndRadius (
397- const Rect .fromLTRB (794.0 , 0.0 , 798.0 , 90.0 ),
398+ const Rect .fromLTRB (800 - thickness - edgeMargin , 0.0 , 798.0 , 90.0 ),
398399 const Radius .circular (3.0 ),
399400 ),
400401 color: _kDefaultIdleThumbColor,
401402 ),
402403 );
403404
404- // Drag scrollbar behavior
405+ // Drag scrollbar behavior.
405406 const double scrollAmount = 10.0 ;
406407 final TestGesture dragScrollbarGesture = await tester.startGesture (const Offset (797.0 , 45.0 ));
407408 await tester.pumpAndSettle ();
@@ -410,7 +411,7 @@ void main() {
410411 find.byType (Scrollbar ),
411412 paints..rrect (
412413 rrect: RRect .fromRectAndRadius (
413- const Rect .fromLTRB (794.0 , 0.0 , 798.0 , 90.0 ),
414+ const Rect .fromLTRB (800 - thickness - edgeMargin , 0.0 , 798.0 , 90.0 ),
414415 const Radius .circular (3.0 ),
415416 ),
416417 // Drag color
@@ -423,7 +424,7 @@ void main() {
423424 await dragScrollbarGesture.up ();
424425 await tester.pumpAndSettle ();
425426
426- // Hover scrollbar behavior
427+ // Hover scrollbar behavior.
427428 final TestGesture gesture = await tester.createGesture (kind: ui.PointerDeviceKind .mouse);
428429 await gesture.addPointer ();
429430 await gesture.moveTo (const Offset (794.0 , 5.0 ));
@@ -433,18 +434,18 @@ void main() {
433434 find.byType (Scrollbar ),
434435 paints
435436 ..rect (
436- rect: const Rect .fromLTRB (784 .0 , 0.0 , 800.0 , 600.0 ),
437+ rect: const Rect .fromLTRB (792 .0 , 0.0 , 800.0 , 600.0 ),
437438 color: const Color (0x08000000 ),
438439 )
439440 ..line (
440- p1: const Offset (784 .0 , 0.0 ),
441- p2: const Offset (784 .0 , 600.0 ),
441+ p1: const Offset (792 .0 , 0.0 ),
442+ p2: const Offset (792 .0 , 600.0 ),
442443 strokeWidth: 1.0 ,
443444 color: const Color (0x1a000000 ),
444445 )
445446 ..rrect (
446447 rrect: RRect .fromRectAndRadius (
447- const Rect .fromLTRB (786.0 , 10.0 , 798.0 , 100.0 ),
448+ const Rect .fromLTRB (800 - thickness - edgeMargin , 10.0 , 798.0 , 100.0 ),
448449 const Radius .circular (3.0 ),
449450 ),
450451 // Hover color
0 commit comments