Skip to content

zagmi/to_format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To Format


Adds a toFormat instance method to num.

Install

$ dart pub add to_format

Use

import 'package:to_format/to_format.dart';

void main() {
  num x = 1234567.89;
  String formatted = x.toFormat(dp: 2, fmt: {'groupSeparator': ' '});
  print(formatted); // 1 234 567.89
}

Licence

BSD

Releases

No releases published

Packages

No packages published

Languages