formatInt function
Implementation
String formatInt(number, {nullTxt = "-"}) {
if (number == null || number == "") {
return nullTxt;
}
int num;
try {
num = int.parse(number.toString());
} catch (e) {
loggerNoStack.i("转换异常:$e");
return nullTxt;
}
return num.toString();
}