CurrencyConvertor class
Constructors
- CurrencyConvertor()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
convert(
{required Currency from, required Currency to, required double amount}) → Future< Paisa> -
Converts the given
amount
from one currency to another.
ReturnsPaisa
object with the converted amount. -
convertFromString(
{required String from, required String to, required double amount}) → Future< Paisa> -
Converts the
amount
from thefrom
currency to theto
currency.
convertFromString accepts String currency codes eg: USD, INR, EUR etc Example: -
rate(
Currency from, Currency to) → Future< Paisa> -
Return the currency conversion rate for the given
from
andto
currencies
Example: -
rateFromCountryCode(
{required String from, required String to}) → Future< Paisa> -
Returns the currency conversion rate for the given
from
andto
country codes.
Example: -
rateFromString(
String from, String to) → Future< Paisa> -
Returns the currency conversion rate for the given
from
andto
currencies strings
Example: