Unverified Commit accd6aba authored by Konstantin Scheglov's avatar Konstantin Scheglov Committed by GitHub

Fix UNUSED_ELEMENT_PARAMETER for unused field formal parameter. (#96684)

parent f97d9e07
...@@ -887,10 +887,10 @@ class SliverReorderableListState extends State<SliverReorderableList> with Ticke ...@@ -887,10 +887,10 @@ class SliverReorderableListState extends State<SliverReorderableList> with Ticke
/// ///
/// The scroll velocity is controlled by the [velocityScalar]: /// The scroll velocity is controlled by the [velocityScalar]:
/// ///
/// velocity = <distance of overscroll> * [velocityScalar]. /// velocity = <distance of overscroll> * [_kDefaultAutoScrollVelocityScalar].
class _EdgeDraggingAutoScroller { class _EdgeDraggingAutoScroller {
/// Creates a auto scroller that scrolls the [scrollable]. /// Creates a auto scroller that scrolls the [scrollable].
_EdgeDraggingAutoScroller(this.scrollable, {this.onScrollViewScrolled, this.velocityScalar = _kDefaultAutoScrollVelocityScalar}); _EdgeDraggingAutoScroller(this.scrollable, {this.onScrollViewScrolled});
// An eyeball value // An eyeball value
static const double _kDefaultAutoScrollVelocityScalar = 7; static const double _kDefaultAutoScrollVelocityScalar = 7;
...@@ -905,12 +905,6 @@ class _EdgeDraggingAutoScroller { ...@@ -905,12 +905,6 @@ class _EdgeDraggingAutoScroller {
/// in between each scroll. /// in between each scroll.
final VoidCallback? onScrollViewScrolled; final VoidCallback? onScrollViewScrolled;
/// The velocity scalar per pixel over scroll.
///
/// How the velocity scale with the over scroll distance. The auto scroll
/// velocity = <distance of overscroll> * velocityScalar.
final double velocityScalar;
late Rect _dragTargetRelatedToScrollOrigin; late Rect _dragTargetRelatedToScrollOrigin;
/// Whether the auto scroll is in progress. /// Whether the auto scroll is in progress.
...@@ -1002,7 +996,7 @@ class _EdgeDraggingAutoScroller { ...@@ -1002,7 +996,7 @@ class _EdgeDraggingAutoScroller {
_scrolling = false; _scrolling = false;
return; return;
} }
final Duration duration = Duration(milliseconds: (1000 / velocityScalar).round()); final Duration duration = Duration(milliseconds: (1000 / _kDefaultAutoScrollVelocityScalar).round());
await scrollable.position.animateTo( await scrollable.position.animateTo(
newOffset, newOffset,
duration: duration, duration: duration,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment