jumpTo method Null safety

void jumpTo(
  1. double size
)

Jumps the attached sheet from its current size to the given size, a fractional value of the parent container's height.

If size is outside of a the attached sheet's min or max child size, jumpTo will jump the sheet to the nearest valid size instead.

Any active sheet animation is canceled. If the sheet's inner scrollable is currently animating (e.g. responding to a user fling), that animation is canceled as well.

Implementation

void jumpTo(double size) {
  _assertAttached();
  assert(size >= 0 && size <= 1);
  // Call start activity to interrupt any other playing activities.
  _attachedController!.extent.startActivity(onCanceled: () {});
  _attachedController!.position.goIdle();
  _attachedController!.extent.hasDragged = false;
  _attachedController!.extent.updateSize(size, _attachedController!.position.context.notificationContext!);
}