asSubscription method

String asSubscription(
  1. String currencyCode,
  2. String period, {
  3. String? locale,
})

Formats this number as a subscription price.

9.99.asSubscription('USD', 'month'); // '$9.99/month'

Implementation

String asSubscription(
  String currencyCode,
  String period, {
  String? locale,
}) {
  return PriceFormatter(locale: locale)
      .formatSubscription(this, currencyCode, period);
}