TextX extension

on

Methods

bold() Text
粗体
color(Color color) Text
colorInt(int color) Text
copyWith({String? data, 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}) Text
todo 手机号中间四位省略为*号,或类似场景。正则? truncationMode leading tail middle todo 艺术字效果 边框、渐变…… foreground paint
fontFamily(String family) Text
字体 配置中先注册family
fontSize(double size) Text
fontWeight(FontWeight? weight) Text
字体粗细、正斜等
italic() Text
斜体
letterSpacing(double spacing) Text
字母间距,可为负数
lineLimit(int num, {TextOverflow? overflow = TextOverflow.ellipsis}) Text
lineSpacing(double spacing) Text
行间距,倍数
overLine({bool active = true, Color? color}) Text
上划线
singleLine({TextOverflow? overflow = TextOverflow.ellipsis}) Text
strikethrough({bool active = true, Color? color}) Text
删除线
textAlignment(TextAlign align) Text
underLine({bool active = true, Color? color}) Text
下划线
wordSpacing(double spacing) Text
单词间距,可为负数