新建一个util.dart
文件,在文件中写入如下转化方法(可根据具体显示需求调整内容)
///超过四位数的数字转化为w格式,如:38128 => 3.8w,381285 => 38.1w
formatCharCount(int count) {
if (count <= 0 || count.isNaN) {
return '0';
}
String strCount
新建一个util.dart
文件,在文件中写入如下转化方法(可根据具体显示需求调整内容)
///超过四位数的数字转化为w格式,如:38128 => 3.8w,381285 => 38.1w
formatCharCount(int count) {
if (count <= 0 || count.isNaN) {
return '0';
}
String strCount