Flutter自定义文本样式输入框,可以让你在TextField中显示不同样式的文本,例如 #话题# @用户 效果
实现思路已在博客园发表,点击进入
text_span_field: 1.0.0
无需额外配置,已内部打入混淆配置
无需额外配置
TextSpanField(
controller: TextEditingController(
text: "这是一条测试信息,你们看他的颜色",
),
rangeStyles: [
RangeStyle(
range: TextRange(start: 0, end: 1),
style: TextStyle(color: Color(0xFF5BA2FF)),
),
RangeStyle(
range: TextRange(start: 3, end: 4),
style: TextStyle(color: Color(0xFF9C7BFF)),
),
],
),
我同时维护的还有以下插件,如果您感兴趣与我一起进行维护,请通过Github联系我,欢迎 issues 和 PR。
平台 | 插件 | 描述 | 版本 |
---|---|---|---|
Flutter | FlutterTencentImPlugin | 腾讯云IM插件 | |
Flutter | FlutterTencentRtcPlugin | 腾讯云Rtc插件 | |
Flutter | FlutterXiaoMiPushPlugin | 小米推送SDK插件 | |
Flutter | FlutterHuaWeiPushPlugin | 华为推送(HMS Push)插件 | |
Flutter | FlutterTextSpanField | 自定义文本样式输入框 | |
Flutter | FlutterClipboardListener | 粘贴板监听器 | |
Flutter | FlutterQiniucloudLivePlugin | Flutter 七牛云直播云插件 | 暂未发布,通过 git 集成 |