formatted property

String get formatted

Format with thousand separators

Implementation

String get formatted {
  return toString().replaceAllMapped(
    RegExp(r'(\d)(?=(\d{3})+(?!\d))'),
    (Match m) => '${m[1]}.',
  );
}