From 936371b50b9206dd1645a71e2ab92cb75669d34b Mon Sep 17 00:00:00 2001 From: kapdroid Date: Wed, 21 Aug 2024 18:11:05 +0530 Subject: [PATCH] feat(number-system-utils): generic class in overall app Signed-off-by: kapdroid --- lib/src/utils/number_system_utils.dart | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/src/utils/number_system_utils.dart b/lib/src/utils/number_system_utils.dart index c64539b..5aa5dd1 100644 --- a/lib/src/utils/number_system_utils.dart +++ b/lib/src/utils/number_system_utils.dart @@ -12,19 +12,15 @@ class NumberSystemUtils { decimalPlaces: decimalPlacesForInternational) : _parseAsIndian(val ?? 0, decimalPlaces: decimalPlaces); - String _parseAsInternational(num val, {int decimalPlaces = 0}) { - return formatValue( - val.toDouble(), - locale: 'en_US', - decimalPlaces: decimalPlaces, - ); + String _parseAsInternational(num val, + {int decimalPlaces = 0, bool isCompact = true}) { + return formatValue(val.toDouble(), + locale: 'en_US', decimalPlaces: decimalPlaces, isCompact: isCompact); } - String _parseAsIndian(num val, {int decimalPlaces = 0}) { - return formatValue( - val.toDouble(), - locale: 'en_IN', - decimalPlaces: decimalPlaces, - ); + String _parseAsIndian(num val, + {int decimalPlaces = 0, bool isCompact = true}) { + return formatValue(val.toDouble(), + locale: 'en_IN', decimalPlaces: decimalPlaces, isCompact: isCompact); } }