@@ -362,6 +362,7 @@ void main() {
362
362
363
363
testWidgets ('Scrollbar widget properties take priority over theme' , (WidgetTester tester) async {
364
364
const double thickness = 4.0 ;
365
+ const double edgeMargin = 2.0 ;
365
366
const bool showTrackOnHover = true ;
366
367
const Radius radius = Radius .circular (3.0 );
367
368
final ScrollController scrollController = ScrollController ();
@@ -394,14 +395,14 @@ void main() {
394
395
find.byType (Scrollbar ),
395
396
paints..rrect (
396
397
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 ),
398
399
const Radius .circular (3.0 ),
399
400
),
400
401
color: _kDefaultIdleThumbColor,
401
402
),
402
403
);
403
404
404
- // Drag scrollbar behavior
405
+ // Drag scrollbar behavior.
405
406
const double scrollAmount = 10.0 ;
406
407
final TestGesture dragScrollbarGesture = await tester.startGesture (const Offset (797.0 , 45.0 ));
407
408
await tester.pumpAndSettle ();
@@ -410,7 +411,7 @@ void main() {
410
411
find.byType (Scrollbar ),
411
412
paints..rrect (
412
413
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 ),
414
415
const Radius .circular (3.0 ),
415
416
),
416
417
// Drag color
@@ -423,7 +424,7 @@ void main() {
423
424
await dragScrollbarGesture.up ();
424
425
await tester.pumpAndSettle ();
425
426
426
- // Hover scrollbar behavior
427
+ // Hover scrollbar behavior.
427
428
final TestGesture gesture = await tester.createGesture (kind: ui.PointerDeviceKind .mouse);
428
429
await gesture.addPointer ();
429
430
await gesture.moveTo (const Offset (794.0 , 5.0 ));
@@ -433,18 +434,18 @@ void main() {
433
434
find.byType (Scrollbar ),
434
435
paints
435
436
..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 ),
437
438
color: const Color (0x08000000 ),
438
439
)
439
440
..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 ),
442
443
strokeWidth: 1.0 ,
443
444
color: const Color (0x1a000000 ),
444
445
)
445
446
..rrect (
446
447
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 ),
448
449
const Radius .circular (3.0 ),
449
450
),
450
451
// Hover color
0 commit comments