Skip to content

Instantly share code, notes, and snippets.

@johsoe
Created August 26, 2024 19:42
Show Gist options
  • Save johsoe/4018813183613a3a5f5b8d7d198b6523 to your computer and use it in GitHub Desktop.
Save johsoe/4018813183613a3a5f5b8d7d198b6523 to your computer and use it in GitHub Desktop.
import 'package:intl/intl.dart';
void main() {
var danishCurrency = NumberFormat.simpleCurrency(locale: "da_DK");
var americanCurrency = NumberFormat.simpleCurrency(locale: "en_US");
var britishCurrency = NumberFormat.simpleCurrency(locale: "en_GB");
var germanCurrency = NumberFormat.simpleCurrency(locale: "de_DE");
var canadianCurrency = NumberFormat.simpleCurrency(locale: "en_CA");
print(danishCurrency.format(12.34) + '/kWh');
print(americanCurrency.format(12.34) + '/kWh');
print(britishCurrency.format(12.34) + '/kWh');
print(germanCurrency.format(12.34) + '/kWh');
print(canadianCurrency.format(12.34) + '/kWh');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment