PaystackCurrency enum

Typed enum of currencies supported by Paystack.

Use this instead of bare strings to avoid typos in currency codes.

Example:

await PayWithPayStack().now(
  currency: PaystackCurrency.ghs.value,
  ...
);

See also: Paystack supported currencies

Inheritance
Available extensions

Values

ngn → const PaystackCurrency

Nigerian Naira

const PaystackCurrency('NGN')
ghs → const PaystackCurrency

Ghanaian Cedi

const PaystackCurrency('GHS')
zar → const PaystackCurrency

South African Rand

const PaystackCurrency('ZAR')
usd → const PaystackCurrency

United States Dollar

const PaystackCurrency('USD')
kes → const PaystackCurrency

Kenyan Shilling

const PaystackCurrency('KES')
xof → const PaystackCurrency

West African CFA Franc

const PaystackCurrency('XOF')
egp → const PaystackCurrency

Egyptian Pound

const PaystackCurrency('EGP')
rwf → const PaystackCurrency

Rwandan Franc

const PaystackCurrency('RWF')

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
The ISO 4217 currency code sent to the Paystack API.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromString(String code) PaystackCurrency?
Returns a PaystackCurrency from its ISO 4217 code (case-insensitive), or null if no match is found.

Constants

values → const List<PaystackCurrency>
A constant List of the values in this enum, in order of their declaration.