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)),
],
);
}
}
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744675931a4587326.html
评论列表(0条)