Files
fl_chart/example/lib/presentation/presentation_utils.dart
zypherift c7e3f36b06
Some checks failed
Code Coverage / upload (push) Has been cancelled
Gh-Pages / build (push) Has been cancelled
Code Verification / verify (push) Has been cancelled
1.0.0
2025-08-09 18:17:34 +02:00

17 lines
391 B
Dart

import 'package:flutter/cupertino.dart';
import 'package:intl/intl.dart';
class AppUtils {
static String getFormattedCurrency(
BuildContext context,
double value, {
bool noDecimals = true,
}) {
final germanFormat = NumberFormat.currency(
symbol: '',
decimalDigits: noDecimals && value % 1 == 0 ? 0 : 2,
);
return germanFormat.format(value);
}
}