gtgalone / currency_text_input_formatter

Currency Text Input Formatter for Flutter.
https://pub.dev/packages/currency_text_input_formatter
MIT License
50 stars 29 forks source link

IS THERE A WAY TO REMOVE CURRENCY FROM OUTPUT? #45

Closed Devlonoah closed 1 year ago

Devlonoah commented 1 year ago

When used with textfield ,the output I get is something like this: USD20,000.

Is there a way to get a formatted currency without the currency, like this:

20,000.

?

gtgalone commented 1 year ago

Hello @Devlonoah !

You can use built-in method.

Check this out.

https://github.com/gtgalone/currency_text_input_formatter#with-built-in-methods

// Built-in Methods
print(formatter.getFormattedValue()); // $ 2,000
print(formatter.getUnformattedValue()); // 2000.00
print(formatter.format('2000')); // $ 2,000
Devlonoah commented 1 year ago

thanks.