/*
 * @Author: XianKaiQun
 * @LastEditors  : WuWei
 * @Date: 2020-10-28 10:48:51
 * @LastEditTime : 2021-04-22 09:18:04
 */
import 'package:flutter/material.dart';
import 'package:wisdom_cli/wisdom_cli.dart';

///关闭组件
class WFClose extends StatelessWidget {
  const WFClose({
    Key? key,
    this.onTap,
    this.backgroundColor,
    this.color,
  }) : super(key: key);
  final void Function()? onTap;
  final Color? backgroundColor;
  final Color? color;
  @override
  Widget build(BuildContext context) {
    final style = WTheme.of(context);
    final colorScheme = style.colorScheme;
    return Wisdom(
      onTap: onTap,
      color: backgroundColor ?? colorScheme.background,
      padding: EdgeInsets.all(1.pt),
      borderRadius: BorderRadius.circular(10.pt),
      child: Icon(
        Icons.close,
        size: 13.pt,
        color: color ?? colorScheme.placeholder,
      ),
    );
  }
}
