getNumberBasedOnLocale method

String getNumberBasedOnLocale(
  1. BuildContext context,
  2. num value
)

Implementation

String getNumberBasedOnLocale(BuildContext context, num value) {
  Locale locale = Localizations.localeOf(context);
  var format = NumberFormat.simpleCurrency(locale: locale.toString());
  final oCcy = NumberFormat("#,##0.00", format.locale);
  return oCcy.format(num);
}