Skip to content

Commit

Permalink
Add en_IN currency
Browse files Browse the repository at this point in the history
  • Loading branch information
praslnx8 committed Mar 31, 2024
1 parent 82e9d27 commit 7230d63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ui/pages/dashboard_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class _DashboardPage
return SfCartesianChart(
primaryXAxis: const DateTimeAxis(),
primaryYAxis:
NumericAxis(numberFormat: NumberFormat.compactCurrency(symbol: '')),
NumericAxis(numberFormat: NumberFormat.compactCurrency(symbol: '', locale: 'en_IN', decimalDigits: 0)),
series: [
LineSeries<MapEntry<DateTime, double>, DateTime>(
color: Colors.green,
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/ui_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ String formatToCurrency(double value, { locale = 'en_IN'}) {

double? parseCurrency(String value) {
try {
final num number = NumberFormat.currency().parse(value);
final num number = NumberFormat.currency(locale: 'en_IN', symbol: '', decimalDigits: 0).parse(value);
if (number.isFinite) {
return number.toDouble();
} else {
Expand Down

0 comments on commit 7230d63

Please sign in to comment.