Search
 
SCRIPT & CODE EXAMPLE
 

DART

flutter format currency fcfa

final oCcy = NumberFormat.currency(
      locale: 'eu',
      customPattern: '#,### u00a4',
      symbol: 'FCFA',
      decimalDigits: 2);

print(oCcy.format(12345)) // 12.345,00 FCFA
Comment

format currency flutter

import 'package:intl/intl.dart';

final oCcy = new NumberFormat("#,##0.00", "en_US");

void main () {

  print("Eg. 1: ${oCcy.format(123456789.75)}");
  print("Eg. 2: ${oCcy.format(.7)}");
  print("Eg. 3: ${oCcy.format(12345678975/100)}");
  print("Eg. 4: ${oCcy.format(int.parse('12345678975')/100)}");
  print("Eg. 5: ${oCcy.format(double.parse('123456789.75'))}");

/* Output :  

Eg. 1: 123,456,789.75
Eg. 2: 0.70
Eg. 3: 123,456,789.75
Eg. 4: 123,456,789.75
Eg. 5: 123,456,789.75


 pubspec.yaml :

  name: testCcy002
  version: 0.0.1
  author: BOH
  description: Test Currency Format from intl.
  dev_dependencies:
    intl: any

   Run pub install to install "intl"  
*/
}
Comment

PREVIOUS NEXT
Code Example
Dart :: materialstateproperty 
Dart :: how to change input text color in flutter 
Dart :: Waiting for another flutter command to release the startup lock.. 
Dart :: flutter width infinity 
Dart :: make a rounded container flutte 
Dart :: listtile remove padding flutter 
Dart :: flutter beta switch 
Dart :: showdialog with builder flutter 
Dart :: flutter appbar trailing icon 
Dart :: rotate IconButton flutter 
Dart :: flutter auto height container 
Dart :: flutter chip label 
Dart :: dart parse boolean from string 
Dart :: how to change legend colour in SfCircularChart in flutter 
Dart :: dart move item in stack to bottom 
Dart :: flutter url image 
Dart :: flutter snackbar replacement 
Dart :: dart check if object has property 
Dart :: six_ft_apart_rounded 
Dart :: flutter text 
Dart :: open popupbutton onclick in flutter 
Dart :: unable to locate android sdk flutter in windows 
Dart :: flutter images 
Dart :: error: xmlhttprequest error. dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 906:28 
Dart :: double to animation in flutter 
Dart :: Flutter Dart - Difference Two DateTime 
Dart :: ink image clip flutter 
Dart :: sort map keys dart 
Dart :: string to timeofday flutter 
Dart :: return map dart 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =