feat: product chart view
This commit is contained in:
3
lib/core/utils/date_formatter.dart
Normal file
3
lib/core/utils/date_formatter.dart
Normal file
@@ -0,0 +1,3 @@
|
||||
class DateFormatter {
|
||||
|
||||
}
|
||||
19
lib/core/utils/number_formatter.dart
Normal file
19
lib/core/utils/number_formatter.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class NumberFormatter {
|
||||
NumberFormatter._();
|
||||
|
||||
static String numberCurrency(dynamic value, String symbol, String locale, {int? decimalDigits = 0}) {
|
||||
NumberFormat numberFormat = NumberFormat.currency(locale: locale, symbol: symbol, decimalDigits: decimalDigits);
|
||||
String formatValue = numberFormat.format(value);
|
||||
|
||||
return formatValue;
|
||||
}
|
||||
|
||||
static compactCurrency(dynamic value, String symbol, String locale) {
|
||||
NumberFormat numberFormat = NumberFormat.compactCurrency(locale: locale, symbol: symbol);
|
||||
String formatValue = numberFormat.format(value);
|
||||
|
||||
return formatValue;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user