Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit 7852d5e

Browse files
Dart Teamalan-knight
Dart Team
authored andcommitted
Add 'decimalDigits' specification for Percent formatters.
PiperOrigin-RevId: 263157925
1 parent 5644b15 commit 7852d5e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/src/intl/number_format.dart

+5
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ class NumberFormat {
180180
NumberFormat.percentPattern([String locale])
181181
: this._forPattern(locale, (x) => x.PERCENT_PATTERN);
182182

183+
/// Create a number format that prints as PERCENT_PATTERN.
184+
NumberFormat.decimalPercentPattern({String locale, int decimalDigits})
185+
: this._forPattern(locale, (x) => x.PERCENT_PATTERN,
186+
decimalDigits: decimalDigits);
187+
183188
/// Create a number format that prints as SCIENTIFIC_PATTERN.
184189
NumberFormat.scientificPattern([String locale])
185190
: this._forPattern(locale, (x) => x.SCIENTIFIC_PATTERN);

0 commit comments

Comments
 (0)