Format a number with thousands separators.
static String formatNumber(int number) { return number.toString().replaceAllMapped(RegExp(r'(\d)(?=(\d{3})+(?!\d))'), (match) => '${match[1]},'); }