/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2021-08-18 16:37:33
 * @LastEditTime : 2022-01-04 16:09:34
 * @Description  : Do not edit
 */
import 'package:flutter/widgets.dart';
import '../../wisdom_cli.dart';

class WisMainTitle extends StatelessWidget {
  const WisMainTitle(
    this.data, {
    this.size,
    Key? key,
    this.color,
    this.height,
    this.textAlign,
    this.overflow,
    this.bold = false,
    this.borderRadius,
    this.weight,
    this.tipWidth,
    this.tipHeight,
    this.tipColor,
  }) : super(key: key);

  final String data;
  final double? size;

  /// 标识颜色
  final Color? color;
  final double? height;
  final TextAlign? textAlign;
  final TextOverflow? overflow;
  final bool bold;
  final FontWeight? weight;
  final double? tipWidth;
  final double? tipHeight;
  final Color? tipColor;
  final BorderRadius? borderRadius;
  @override
  Widget build(BuildContext context) {
    final colorScheme = WTheme.of(context).colorScheme;
    return Row(
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        Wisdom(
          borderRadius: borderRadius ?? BorderRadius.circular(6.pt),
          height: tipWidth ?? 15.pt,
          width: tipHeight ?? 4.pt,
          color: tipColor ?? Color(0xff2D8CF0),
        ),
        SizedBox(width: 10.pt),
        WisText(
          data,
          height: height,
          textAlign: textAlign,
          overflow: overflow,
          color: color ?? colorScheme.mainTitle,
          size: size ?? 15.pt,
          weight: bold ? FontWeight.w600 : this.weight ?? null,
        ),
      ],
    );
  }
}
