File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,10 @@ class CurrencyUtil {
4242 final normalizedValue = roundNumber (inputValue);
4343 final compactResult = _getCompactFormatResult (normalizedValue);
4444 final compactValue = compactResult.value;
45- final int usedDecimalDigits = (passedDecimalDigits ??
46- decimalDigits ??
47- (((useCompact && compactValue % 1 != 0 ) || inputValue % 1 != 0 )
48- ? 2
49- : 0 ));
45+ final int usedDecimalDigits =
46+ ((useCompact && compactValue % 1 != 0 ) || inputValue % 1 != 0 )
47+ ? (passedDecimalDigits ?? decimalDigits ?? 2 )
48+ : 0 ;
5049 final localFormatter = locale.getCurrencyFormatNoSymbol (usedDecimalDigits);
5150
5251 try {
@@ -88,7 +87,9 @@ class CurrencyUtil {
8887
8988 String getFormattedInrDouble (num amount, {bool ? compact}) =>
9089 formatNumber (amount, compact: compact);
90+
9191 String getFormattedInrInt (num amount) => formatCurrency (amount);
92+
9293 String getFormattedIntDouble2Places (num amount, {bool ? compact}) =>
9394 formatNumber (amount, compact: compact, passedDecimalDigits: 2 );
9495
You can’t perform that action at this time.
0 commit comments