text method
Text
text({
- Key? key,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextDirection? textDirection,
- Locale? locale,
- bool? softWrap,
- TextOverflow? overflow,
- double? textScaleFactor,
- int? maxLines,
- String? semanticsLabel,
- TextWidthBasis? textWidthBasis,
- TextHeightBehavior? textHeightBehavior,
从字符串生成文本控件 >>> 生成基础文本组件
@param style 文本样式(可选) @param strutStyle 支撑样式(可选) @param textAlign 文本对齐方式(可选) @param textDirection 文本方向(可选) @param locale 区域设置(可选) @param softWrap 是否自动换行(可选) @param overflow 文本溢出处理方式(可选) @param textScaleFactor 文本缩放因子(可选) @param maxLines 最大行数(可选) @param semanticsLabel 语义标签(可选) @param textWidthBasis 文本宽度基准(可选) @param textHeightBehavior 文本高度行为(可选) @return 配置完成的Text组件
Implementation
Text text(
{Key? key,
TextStyle? style,
StrutStyle? strutStyle,
TextAlign? textAlign,
TextDirection? textDirection,
Locale? locale,
bool? softWrap,
TextOverflow? overflow,
double? textScaleFactor,
int? maxLines,
String? semanticsLabel,
TextWidthBasis? textWidthBasis,
TextHeightBehavior? textHeightBehavior}) {
return Text(this,
style: style,
strutStyle: strutStyle,
textAlign: textAlign,
textDirection: textDirection,
locale: locale,
softWrap: softWrap,
overflow: overflow,
textScaler: TextScaler.linear(textScaleFactor ?? 1),
maxLines: maxLines,
semanticsLabel: semanticsLabel,
textWidthBasis: textWidthBasis,
textHeightBehavior: textHeightBehavior);
}