ElScaleTap constructor

const ElScaleTap({
  1. Key? key,
  2. required Widget child,
  3. Duration duration = const Duration(milliseconds: 150),
  4. Curve curve = Curves.decelerate,
  5. double scale = 0.96,
  6. double hoverScale = 1.0,
  7. MouseCursor? cursor,
  8. bool? disabled,
  9. HitTestBehavior? behavior = HitTestBehavior.opaque,
  10. VoidCallback? onTap,
  11. GestureTapDownCallback? onTapDown,
  12. GestureTapUpCallback? onTapUp,
  13. 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,
});