WidgetGestureExtensions extension
Extension to add liquid tap effects to any widget using swift_animations
Similar to swift_liquid's .sGestureDetector(), but uses swift_animations
for the animation system with spring physics.
Example:
Container(
width: 100,
height: 100,
color: Colors.blue,
)
.sGestureDetector(
onPressed: () => print('Tapped'),
onLongPress: () => print('Long pressed'),
)
- on
Methods
-
sGestureDetector(
{VoidCallback? onPressed, VoidCallback? onLongPress, double scaleOnPress = 1.1, Duration longPressDuration = const Duration(milliseconds: 500), bool autoScaleBySize = true, double basePixelIncrease = 10.0, double stretchSpringDamping = 10.0, double stretchSensitivity = 1.0, double translateSensitivity = 1.0, bool enableBrightness = false}) → Widget -
Available on Widget, provided by the WidgetGestureExtensions extension
Add liquid tap effects to any widget