import 'package:flutter/cupertino.dart';
import 'package:wgshare/common/config/colorUtils.dart';

// 快捷Text使用
Text quickText(text,
    {double? size,
    double? wordSpacing,
    Color color = CommonColors.defaultColor,
    TextAlign? align,
    FontWeight? fontWeight,
    TextOverflow overflow = TextOverflow.ellipsis,
    int maxLines = 1,
    bool noTextPadding = false,
    TextDecoration decoration = TextDecoration.none}) {
  return Text(
    text.toString(),
    textAlign: align,
    maxLines: maxLines,
    overflow: overflow,
    style: TextStyle(
      decoration: decoration,
      fontSize: size,
      color: color,
      height: noTextPadding ? 1 : null,
      fontWeight: fontWeight,
      wordSpacing: wordSpacing,
    ),
  );
}
