Step-by-Step on how to display currency symbols like ₦ or Kč in flutter

Komolafe Ezekiel dare
3 min readSep 7, 2021

--

I am currently working on a mobile application that requires the use of currency, and I needed it to display currency symbols but the only one available or I could have access to on my keyboard was the dollar sign.
Then, I decided to surf the net for an answer, but after 2 days I couldn’t get a specific answer to my problem, but from all that I learned, I put together in other to create myself the solution, and I have put together step by step of how to use different currency in this article.

Content in this article includes:

· How to display naira in flutter
· How to display any kind of currency symbol
· Link to list of iso currency symbol used in flutter

· How to display naira in a flutter

Naira is the currency that is being spent in Nigeria, so let’s us see step by step how to display naira in flutter;
1. Install this plugin in your pubspec.yaml under dependency

adding intl package

2. Then run this function

If you run this function you will get the naira symbol ₦ printed out on the console. But if you want to use this in a Text widget or display it any where you can do this instead

with this the currency function will return format, to display it in text you can simply write it like this

This will display the naira symbol as a text
So, you can use the function if all you want to display is naira symbol.

· How to display any kind of currency symbol

To display any currency symbol be it pounds, euro, dirham, or Japanese yen, you just need a little tweak to the function above. For example, to display Euro the function, the function becomes

The function above will print € in the console and you can the display it in text widget like this:

So the major difference in the function will be to change the name, in front of the platform localNameto the string of the ISO symbol for the currency you want to display, well this will be easy for those into foreign exchange, below are some examples of the iso code to display some currencies

The function to display any currency symbol in flutter is this

The above function will print any currency symbol you want to print in flutter, all you need to do is to put the right three letter ISO symbol for the currency you want to display

Link to list of iso currency symbol used in flutter

To get all the currency pair and their iso symbol to use in the function above visit the link below
https://en.wikipedia.org/wiki/ISO_4217
Thank you for reading, kindly please share, comment and give this article a clap if it helps you.

--

--

Komolafe Ezekiel dare

A guitarist, backend developer, mobile developer, and ui/ux designer