sizeFormat method
获取文档大小
Implementation
String sizeFormat() {
double res = this / 1024.0;
if (res < 1024) {
return '${res.toStringAsFixed(1)}KB';
} else {
res = res / 1024;
}
if (res < 1024) {
return '${res.toStringAsFixed(1)}MB';
} else {
return '${(res / 1024).toStringAsFixed(2)}GB';
}
}