ElScaleTap constructor
const
ElScaleTap({
- Key? key,
- required Widget child,
- Duration duration = const Duration(milliseconds: 150),
- Curve curve = Curves.decelerate,
- double scale = 0.96,
- double hoverScale = 1.0,
- MouseCursor? cursor,
- bool? disabled,
- HitTestBehavior? behavior = HitTestBehavior.opaque,
- VoidCallback? onTap,
- GestureTapDownCallback? onTapDown,
- GestureTapUpCallback? onTapUp,
- VoidCallback? onCancel,
按压时子组件会执行缩放动画,这是一个通用组件,可以包裹任何 Widget
Implementation
const ElScaleTap({
super.key,
required this.child,
this.duration = const Duration(milliseconds: 150),
this.curve = Curves.decelerate,
this.scale = 0.96,
this.hoverScale = 1.0,
this.cursor,
this.disabled,
this.behavior = HitTestBehavior.opaque,
this.onTap,
this.onTapDown,
this.onTapUp,
this.onCancel,
});