StringExtension extension

on

Methods

highLightClickableRichText({required List<String> keywords, Color textColor = Colors.black, Color highColor = Colors.blue, double fontSize = 12, double? keywordFontSize, FontWeight fontWeight = FontWeight.normal, FontWeight? keywordFontWeight, void onKeywordTap(String keyword)?}) Text

Available on String, provided by the StringExtension extension

根据关键字创建关键字高亮可点击的富文本widget keywords 需要高亮可点击的关键字列表 textColor 文本颜色,默认是黑色 highColor 高亮文本颜色,默认是蓝色 fontSize 文本的大小,默认是12 keywordFontSize 高亮文本大小,默认是fontSize大小 fontWeight 文本的字体权重,默认是FontWeight.normal keywordFontWeight 高亮文本的字体权重,默认是fontWeight onKeywordTap 高亮文本点击方法回调
isPhoneNum() bool

Available on String, provided by the StringExtension extension

手机号验证
launch() Future<bool>

Available on String, provided by the StringExtension extension

字符串转uri后执行launchUrl
parseDouble({double defaultValue = 0.0}) double

Available on String, provided by the StringExtension extension

文字转double defaultValue 默认值
parseInt({int defaultValue = 0}) int

Available on String, provided by the StringExtension extension

文字转int defaultValue 默认值
parseUri() Future<Uri?>

Available on String, provided by the StringExtension extension

字符串转Uri