PQText.rich constructor
PQText.rich(
- String? title, {
- Key? key,
- List<
InlineSpan> ? children, - TextDecoration? decoration,
- TextAlign textAlign = TextAlign.start,
- int? maxLines,
- Color? color = const Color(0xff000000),
- double? fontSize,
- String? fontFamily,
- FontWeight? fontWeight = FontWeight.normal,
- double? wordSpacing,
- double? letterSpacing,
- StrutStyle? strutStyle,
- TextOverflow? overflow = TextOverflow.ellipsis,
- double? textScaleFactor = 1,
- double? lineHeight,
创建Text Widget,默认是显示一行,如果要多行请使用PQText.richLines
Implementation
PQText.rich(
this.title, {
Key? key,
this.children,
this.decoration,
this.textAlign = TextAlign.start,
this.maxLines,
this.color = const Color(0xff000000),
double? fontSize,
this.fontFamily,
this.fontWeight = FontWeight.normal,
this.wordSpacing,
this.letterSpacing,
this.strutStyle,
this.overflow = TextOverflow.ellipsis,
this.textScaleFactor = 1,
double? lineHeight,
}) : fontSize = fontSize ?? defaultFontSize,
super(key: key) {
if (lineHeight != null) {
height = lineHeight / this.fontSize;
}
}