valDecimal static method

String valDecimal(
  1. double? value, {
  2. String? locale,
  3. int? digits,
})

Implementation

static String valDecimal(double? value, {String? locale, int? digits}) {
  var effectiveLocale = locale ?? defaultLocale;
  var formatter = digits != null
      ? NumberFormat.decimalPatternDigits(
          locale: effectiveLocale,
          decimalDigits: digits,
        )
      : NumberFormat.decimalPattern(effectiveLocale);
  return formatter.format(value ?? 0);
}