up date extension comma

null_safety
张萌 4 years ago
parent c02a487fd5
commit fbeee06d4a

@ -13,8 +13,8 @@ extension NumExt on num {
BorderRadius get radius => BorderRadius.circular(this.w); BorderRadius get radius => BorderRadius.circular(this.w);
/// ///
String get comma { String comma ({int fixed}){
String _num = this.toString(); String _num = this.toStringAsFixed(fixed??2);
String str = ''; String str = '';
int count = 0; int count = 0;
if (_num.indexOf('.') == -1) { if (_num.indexOf('.') == -1) {

Loading…
Cancel
Save