Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use special unicode characters in string in flutter?

Tags:

flutter

dart

I want to display this text word1 • word2 • word3 and I found that in this flutter doc there is a $middot constant but I cant find it inside the ascii.dart file . I also tried to define a const int $middot = 0x00B7; and use it in my text like word1 ${$middot} word2 ${$middot} word3, but the middot is simple ignored and I get word1 word2 word3

How can I achieve this?

like image 808
Abhriya Roy Avatar asked Jan 18 '26 21:01

Abhriya Roy


1 Answers

I use this and it works:

const kInterPunctChr = '\u22C5';

final words = 'word1 $kInterPunctChr word2';
like image 188
Esen Mehmet Avatar answered Jan 21 '26 09:01

Esen Mehmet