Flutter - Text Widget does not render currency icons

1.4k Views Asked by At

In my application, I have a screen that shows pricing. However, the currency icon does not appear correctly in some places (look at the amount 7000). This problem is more frequent on iOS devices, with a few occurrences on Android devices.

The information is retrieved in the following manner:

Text("₹ 7000.00") // in application the pricing is retrieved from api call.

The currency icon is included in the data I receive from the api request. "₹7000" is an example.

The font used is Gotham Rounded. Is this due to the font's inability to render currency icons? What is the best way to resolve this problem?

enter image description here

1

There are 1 best solutions below

4
On

It's better to use Unicode characters for currency symbols because most of the symbols are not yet supported in flutter so your device does not understand the string so it does not render it on mobile.

Unicode characters on the other hand could be easily translated after compilation

You can find unicode characters for different symbols here

So you have something like this instead

Text("\u{20B9}");