封装组件可以对点击做高亮交互
    参数说明

    1. onTap 点击事件(必选)
    2. color 背景颜色(可选)
    3. hignLightColor 点击高亮背景颜色(可选)
    4. padding 内边距(可选)
    5. margin 外边距(可选)
    6. radius 圆角(可选)
    7. child 子组件 (必选) ```dart class ClickView extends StatefulWidget { final Function onTap; final Widget child; final Color color; final Color highLightColor; final EdgeInsetsGeometry padding; final EdgeInsetsGeometry margin; final double radius; ClickView({Key key, @require this.onTap, @require this.child, this.color=Colors.transparent, this.highLightColor=const Color(0x22000000), this.padding=const EdgeInsets.all(0), this.margin=const EdgeInsets.all(0), this.radius=0}) : super(key: key); @override ClickViewState createState() => ClickViewState(); }

    class ClickViewState extends State { Color background; @override void initState() { super.initState(); background = widget.color; } @override Widget build(BuildContext context) { return GestureDetector( onTapDown: (TapDownDetails e) { setState(() { background = widget.highLightColor; }); }, onTapUp: (TapUpDetails e) { setState(() { background = widget.color; }); widget.onTap(); }, onTapCancel: () { setState(() { background = widget.color; }); }, child: Container( padding: widget.padding, margin: widget.margin, decoration: BoxDecoration( color: background, borderRadius: BorderRadius.circular(widget.radius), ), child: widget.child, ), );
    } } ```