formatAsDecimalPercent method

String formatAsDecimalPercent({
  1. String? locale,
  2. int decimalDigits = 2,
})

Formats the number as a decimal percentage with the given locale and decimalDigits.

Implementation

String formatAsDecimalPercent({String? locale, int decimalDigits = 2}) {
  return NumberFormat.decimalPercentPattern(
          locale: locale, decimalDigits: decimalDigits)
      .format(this);
}