From accd6abae599f9914d1570ac3cf4388d5c578266 Mon Sep 17 00:00:00 2001 From: Konstantin Scheglov Date: Fri, 14 Jan 2022 15:17:35 -0800 Subject: [PATCH] Fix UNUSED_ELEMENT_PARAMETER for unused field formal parameter. (#96684) --- .../flutter/lib/src/widgets/reorderable_list.dart | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/flutter/lib/src/widgets/reorderable_list.dart b/packages/flutter/lib/src/widgets/reorderable_list.dart index 0b2639a56a..a87176e176 100644 --- a/packages/flutter/lib/src/widgets/reorderable_list.dart +++ b/packages/flutter/lib/src/widgets/reorderable_list.dart @@ -887,10 +887,10 @@ class SliverReorderableListState extends State with Ticke /// /// The scroll velocity is controlled by the [velocityScalar]: /// -/// velocity = * [velocityScalar]. +/// velocity = * [_kDefaultAutoScrollVelocityScalar]. class _EdgeDraggingAutoScroller { /// Creates a auto scroller that scrolls the [scrollable]. - _EdgeDraggingAutoScroller(this.scrollable, {this.onScrollViewScrolled, this.velocityScalar = _kDefaultAutoScrollVelocityScalar}); + _EdgeDraggingAutoScroller(this.scrollable, {this.onScrollViewScrolled}); // An eyeball value static const double _kDefaultAutoScrollVelocityScalar = 7; @@ -905,12 +905,6 @@ class _EdgeDraggingAutoScroller { /// in between each scroll. final VoidCallback? onScrollViewScrolled; - /// The velocity scalar per pixel over scroll. - /// - /// How the velocity scale with the over scroll distance. The auto scroll - /// velocity = * velocityScalar. - final double velocityScalar; - late Rect _dragTargetRelatedToScrollOrigin; /// Whether the auto scroll is in progress. @@ -1002,7 +996,7 @@ class _EdgeDraggingAutoScroller { _scrolling = false; return; } - final Duration duration = Duration(milliseconds: (1000 / velocityScalar).round()); + final Duration duration = Duration(milliseconds: (1000 / _kDefaultAutoScrollVelocityScalar).round()); await scrollable.position.animateTo( newOffset, duration: duration,