String formatAmount(Object value) { return value.toString().replaceAll(RegExp(r'\B(?=(\d{3})+(?!\d))'), ','); }