formatSubscription method
Formats a subscription price with period.
formatSubscription(9.99, 'USD', 'month'); // '$9.99/month'
formatSubscription(99.99, 'USD', 'year'); // '$99.99/year'
Implementation
String formatSubscription(
double price,
String currencyCode,
String period,
) {
return '${format(price, currencyCode)}/$period';
}