StretchEffect constructor

const StretchEffect({
  1. Key? key,
  2. double stretchStrength = 0.0,
  3. required Axis axis,
  4. required Widget child,
})

Creates a StretchEffect widget that applies a stretch effect when the user overscrolls horizontally or vertically.

The stretchStrength controls the intensity of the stretch effect and must be between -1.0 and 1.0.

Implementation

const StretchEffect({
  super.key,
  this.stretchStrength = 0.0,
  required this.axis,
  required this.child,
}) : assert(
       stretchStrength >= -1.0 && stretchStrength <= 1.0,
       'stretchStrength must be between -1.0 and 1.0',
     );