/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2023-03-13 17:15:14
 * @LastEditTime : 2023-05-15 17:43:46
 * @Description  : Do not edit
 */

import 'package:flutter/material.dart';
import 'package:wisdom_cli/wisdom_cli.dart';

///选中小条
class WisActiveness extends StatelessWidget {
  const WisActiveness({
    Key? key,
    this.width,
    this.height,
    this.color,
    this.margin,
    this.borderRadius,
  }) : super(key: key);

  final double? width;
  final double? height;
  final Color? color;
  final EdgeInsetsGeometry? margin;
  final BorderRadius? borderRadius;

  ///选中小条竖向显示
  WisActiveness.vertical({
    double? width,
    double? height,
    this.color,
    this.borderRadius,
    EdgeInsetsGeometry? margin,
  })  : this.width = width ?? 3.pt,
        this.height = height ?? 20.pt,
        this.margin = margin ?? EdgeInsets.only(right: 12.pt);

  @override
  Widget build(BuildContext context) {
    final _width = width ?? 20.pt;
    final _height = height ?? 3.pt;
    return Wisdom(
      margin: margin ?? EdgeInsets.only(top: 12.pt),
      width: _width,
      height: _height,
      color: color ?? Theme.of(context).primaryColor,
      borderRadius: borderRadius ?? BorderRadius.circular(_height),
    );
  }
}
