admin管理员组文章数量:1389861
I am looking for something like 1̂.
I have tried this but it only works for letters, not numbers.
This works just fine.
Text('a\u0302')
This displays the caret after the number 7.
Text('7\u0302')
I am looking for something like 1̂.
I have tried this but it only works for letters, not numbers.
This works just fine.
Text('a\u0302')
This displays the caret after the number 7.
Text('7\u0302')
- can you share the screenshot or something how you want it to be displayed? – Munsif Ali Commented Mar 14 at 4:50
1 Answer
Reset to default 1Maybe a stacked widget like this?
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text('this '),
CaretLetter('7'),
Text(' is custom'),
],
),
class CaretLetter extends StatelessWidget {
final String s;
const CaretLetter(this.s, {super.key});
@override
Widget build(BuildContext context) {
return Stack(
alignment: AlignmentDirectional.topCenter,
children: [
Text('\u0302'),
Padding(padding: const EdgeInsets.fromLTRB(0, 4, 0, 0), child: Text(s)),
],
);
}
}
本文标签: How do I display a number with a caret on top in FlutterStack Overflow
版权声明:本文标题:How do I display a number with a caret on top in Flutter? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744675931a2619109.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论