paisa 0.0.5 paisa: ^0.0.5 copied to clipboard
A Flutter and Dart plugin for converting currencies and getting the latest exchange rates. Supports 161 currencies.
paisa.dart #
A simple package to converts currencies for Dart and Flutter.
Installation #
In your pubspec.yaml
:
dependencies:
paisa: ^0.0.4
Usage #
void main(List<String> args) {
// Converts USD to INR
print(CurrencyConvertor.convert(from: Currency.USD, to: Currency.INR, amount: 100));
print(CurrencyConvertor.convertFromString(from: 'USD', to: 'INR', amount: 100));
// Get exchange rate for USD to INR
print(CurrencyConvertor.rate(Currency.USD, Currency.INR));
print(CurrencyConvertor.rateFromString('USD', 'INR'));
print(CurrencyConvertor.rateFromCountryCode(from: 'US', to: 'IN'));
}
Note #
This library uses exchangerate-api for getting the conversion rates and can be considered a unoffical wrapper for exchangerate-api's Open API.
The library handles the conversion of Currency Code to ISO 4217 Three Letter Currency Code, unless you choose to use convertFromString()
or rateFromString()
According to exchangerate-api the conversion rates are refreshed every 24 hours.
If you would like to know about rate limiting and all of the supported and unsupported currencies, Please checkout Supported Currencies Documentation
Features and bugs #
Please file feature requests and bugs at the issue tracker.
Contributions to this repository are welcome.