/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2022-11-10 17:01:19
 * @LastEditTime : 2023-02-02 16:54:36
 * @Description  : Do not edit
 */
part of '../index.dart';

class DotLine extends StatelessWidget {
  const DotLine({
    Key? key,
    this.color,
    this.fadeColor,
    this.isPrimary = false,
  }) : super(key: key);
  final color;
  final fadeColor;
  final bool isPrimary;

  @override
  Widget build(BuildContext context) {
    return Wisdom.row(
      margin: EdgeInsets.only(
        left: isPrimary ? 0 : 3.pt,
      ),
      children: [
        Stack(
          children: [
            if (isPrimary) ...[
              Wisdom(
                color: fadeColor,
                borderRadius: BorderRadius.circular(100.pt),
                height: 16.pt,
                width: 16.pt,
              ),
            ] else ...[
              Wisdom(
                borderRadius: BorderRadius.circular(100.pt),
                border: Border.all(
                  color: color,
                ),
                height: 10.pt,
                width: 10.pt,
              ),
            ],
            Wisdom(
              margin: EdgeInsets.only(
                left: isPrimary ? 7.5.pt : 5.pt,
                top: isPrimary ? 6.pt : 10.pt,
              ),
              width: 1.pt,
              height: isPrimary ? 56.pt : 59.pt,
              gradient: LinearGradient(
                colors: [color, fadeColor],
                begin: Alignment.topCenter,
                end: Alignment.bottomCenter,
              ),
            ),
            if (isPrimary) ...[
              Positioned(
                left: 3.pt,
                top: 3.pt,
                child: Wisdom(
                  color: color,
                  borderRadius: BorderRadius.circular(100.pt),
                  height: 10.pt,
                  width: 10.pt,
                ),
              ),
            ]
          ],
        )
      ],
    );
  }
}
