SnappingPosition.factor constructor

const SnappingPosition.factor({
  1. required double positionFactor,
  2. Curve snappingCurve = Curves.easeOutSine,
  3. Duration snappingDuration = const Duration(milliseconds: 250),
  4. double grabbingContentOffset = GrabbingContentOffset.middle,
})

Creates a snapping position that is given a positionFactor positionFactor: 1 = Full size; 0 = Smallest size. Can be bigger than 1 and smaller than 0 if that is wanted.

Implementation

const SnappingPosition.factor({
  required double positionFactor,
  this.snappingCurve = Curves.easeOutSine,
  this.snappingDuration = const Duration(milliseconds: 250),
  this.grabbingContentOffset = GrabbingContentOffset.middle,
})  : this._positionPixel = null,
      this._positionFactor = positionFactor;