dispatchScrollEndNotification method Null safety

  1. @override
void dispatchScrollEndNotification(
  1. ScrollMetrics metrics,
  2. BuildContext context
)
override

Dispatch a ScrollEndNotification with the given metrics and overscroll.

Implementation

@override
void dispatchScrollEndNotification(ScrollMetrics metrics, BuildContext context) {
  // We might not have DragEndDetails yet if we're being called from beginActivity.
  final dynamic lastDetails = _controller!.lastDetails;
  ScrollEndNotification(
    metrics: metrics,
    context: context,
    dragDetails: lastDetails is DragEndDetails ? lastDetails : null,
  ).dispatch(context);
}