YkTextWidget constructor

YkTextWidget(
  1. String data, {
  2. Key? key,
  3. TextStyle? style,
  4. TextAlign? textAlign,
  5. TextDirection? textDirection,
  6. Locale? locale,
  7. bool? softWrap,
  8. TextOverflow? overflow,
  9. double? textScaleFactor,
  10. int? maxLines,
  11. String fontFamily = '',
})

Implementation

YkTextWidget(
  super.data, {
  super.key,
  TextStyle? style,
  super.textAlign,
  super.textDirection,
  super.locale,
  super.softWrap,
  super.overflow,
  super.textScaleFactor,
  super.maxLines,
  String fontFamily = '', // 设置默认字体
}) : super(
        style: (fontFamily.isNotEmpty) ? style?.copyWith(fontFamily: fontFamily) : style,
      );