countFormat property

String get countFormat

Implementation

String get countFormat {
  var count = this?.toInt() ?? 0;
  if (count > 10000) {
    return "${(count / 10000).toStringAsFixed(1)}w";
  }
  if (count > 1000) {
    return "${(count / 1000).toStringAsFixed(1)}k";
  }
  return count.toString();
}