tolyui_text 0.0.1
tolyui_text: ^0.0.1 copied to clipboard
part of tolyui, simple to use text
How To Use
HighlightText(
"点击 123 或者 hello@email.com",
rules: {
r'\d+': HighlightRule(
TextStyle(color: Colors.blue, decoration: TextDecoration.underline),
onTap: (match) => print('点击了数字: ${match.matchedText}'),
),
r'\S+@\S+\.\S+': HighlightRule(
TextStyle(color: Colors.green, decoration: TextDecoration.underline),
onTap: (match) => print('点击了邮箱: ${match.matchedText}'),
),
},
style: TextStyle(fontSize: 16),
)