Bounceable constructor
const
Bounceable({
- Key? key,
- required VoidCallback? onTap,
- required Widget child,
- void onTapUp()?,
- void onTapDown()?,
- VoidCallback? onTapCancel,
- VoidCallback? onLongPress,
- Duration? duration = const Duration(milliseconds: 200),
- Duration? reverseDuration = const Duration(milliseconds: 200),
- Curve curve = Curves.decelerate,
- Curve? reverseCurve = Curves.decelerate,
- double scaleFactor = 0.8,
- HitTestBehavior? hitTestBehavior,
Implementation
const Bounceable({
super.key,
required this.onTap,
required this.child,
this.onTapUp,
this.onTapDown,
this.onTapCancel,
this.onLongPress,
this.duration = const Duration(milliseconds: 200),
this.reverseDuration = const Duration(milliseconds: 200),
this.curve = Curves.decelerate,
this.reverseCurve = Curves.decelerate,
this.scaleFactor = 0.8,
this.hitTestBehavior,
}) : assert(
scaleFactor >= 0.0 && scaleFactor <= 1.0,
"The valid range of scaleFactor is from 0.0 to 1.0.",
);