/*
 * @Author: XianKaiQun
 * @LastEditors: XianKaiQun
 * @Date: 2020-10-28 10:48:51
 * @LastEditTime: 2020-11-04 14:35:33
 */
import 'package:flutter/material.dart';
import 'package:wisdom_cli/wisdom_cli.dart';

///关闭组件
class WClose extends StatelessWidget {
  const WClose({
    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: 15.pt,
        color: color ?? colorScheme.placeholder,
      ),
    );
  }
}
