stretchStrength property
final
The overscroll strength applied for the stretching effect.
The value should be between -1.0 and 1.0 inclusive.
For the horizontal axis:
- Positive values apply a pull/stretch from left to right, where 1.0 represents the maximum stretch to the right.
- Negative values apply a pull/stretch from right to left, where -1.0 represents the maximum stretch to the left.
For the vertical axis:
- Positive values apply a pull/stretch from top to bottom, where 1.0 represents the maximum stretch downward.
- Negative values apply a pull/stretch from bottom to top, where -1.0 represents the maximum stretch upward.
This example shows how to set the horizontal stretch strength to pull right.
link
const StretchEffect(
stretchStrength: 0.5,
axis: Axis.horizontal,
child: Text('Hello, World!'),
);
Implementation
final double stretchStrength;