GestureConfig constructor

GestureConfig({
  1. double minScale = 0.8,
  2. double maxScale = 5.0,
  3. double speed = 1.0,
  4. bool cacheGesture = false,
  5. double inertialSpeed = 100.0,
  6. double initialScale = 1.0,
  7. bool inPageView = false,
  8. double? animationMinScale,
  9. double? animationMaxScale,
  10. InitialAlignment initialAlignment = InitialAlignment.center,
  11. GestureDetailsIsChanged? gestureDetailsIsChanged,
  12. HitTestBehavior hitTestBehavior = HitTestBehavior.deferToChild,
  13. bool reverseMousePointerScrollDirection = false,
})

Implementation

GestureConfig({
  this.minScale = 0.8,
  this.maxScale = 5.0,
  this.speed = 1.0,
  this.cacheGesture = false,
  this.inertialSpeed = 100.0,
  this.initialScale = 1.0,
  this.inPageView = false,
  double? animationMinScale,
  double? animationMaxScale,
  this.initialAlignment = InitialAlignment.center,
  this.gestureDetailsIsChanged,
  this.hitTestBehavior = HitTestBehavior.deferToChild,
  this.reverseMousePointerScrollDirection = false,
})  : assert(minScale <= maxScale),
      animationMinScale = animationMinScale ??= minScale * 0.8,
      animationMaxScale = animationMaxScale ??= maxScale * 1.2,
      assert(animationMinScale <= animationMaxScale),
      assert(animationMinScale <= minScale),
      assert(animationMaxScale >= maxScale),
      assert(minScale <= initialScale && initialScale <= maxScale),
      assert(speed > 0),
      assert(inertialSpeed > 0);