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

This commit is contained in:
Konstantin Scheglov 2022-01-14 15:17:35 -08:00 committed by GitHub
parent f97d9e0796
commit accd6abae5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -887,10 +887,10 @@ class SliverReorderableListState extends State<SliverReorderableList> with Ticke
///
/// The scroll velocity is controlled by the [velocityScalar]:
///
/// velocity = <distance of overscroll> * [velocityScalar].
/// velocity = <distance of overscroll> * [_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 = <distance of overscroll> * 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,