GestureConfig constructor
GestureConfig({
- double minScale = 0.8,
- double maxScale = 5.0,
- double speed = 1.0,
- bool cacheGesture = false,
- double inertialSpeed = 100.0,
- double initialScale = 1.0,
- bool inPageView = false,
- double? animationMinScale,
- double? animationMaxScale,
- InitialAlignment initialAlignment = InitialAlignment.center,
- GestureDetailsIsChanged? gestureDetailsIsChanged,
- HitTestBehavior hitTestBehavior = HitTestBehavior.deferToChild,
- 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);