textTitle method

Text textTitle({
  1. Key? key,
  2. required BuildContext context,
  3. StrutStyle? strutStyle,
  4. TextAlign? textAlign,
  5. TextDirection? textDirection,
  6. Locale? locale,
  7. bool? softWrap,
  8. TextOverflow? overflow,
  9. double? textScaleFactor,
  10. int? maxLines,
  11. String? semanticsLabel,
  12. TextWidthBasis? textWidthBasis,
  13. TextHeightBehavior? textHeightBehavior,
})

从字符串生成标题文本控件 >>> 生成标题文本组件

@param context 构建上下文 @return 使用主题标题样式的文本组件

Implementation

Text textTitle(
    {Key? key,
    required BuildContext context,
    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: Theme.of(context).textTheme.headlineSmall,
      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);
}