text static method
Implementation
static Widget text({
required String label,
Color? color,
Color? lineColor,
double lineWidth = 60.0,
double spacing = 16.0,
double thickness = 1.0,
TextStyle? textStyle,
double height = 40.0,
}) {
final textColor = color ?? textStyle?.color ?? Colors.white;
final effectiveLineColor = lineColor ?? textColor.withColorOpacity(0.5);
return CustomPaint(
size: Size(double.infinity, height.h),
painter: CenterTextDivider(
content: TextSpan(
text: label,
style: textStyle ??
TextStyle(
fontSize: 14, fontWeight: FontWeight.w400, color: textColor),
),
lineColor: effectiveLineColor,
thickness: thickness,
spacing: spacing.w,
lineWidth: lineWidth.w,
),
);
}