currencies 0.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new62

The fundamental package for handling currencies with Dart.

pub package Build Status

This package provides a set of high-level classes that make it easy to handle currencies with Dart. It's platform-independent, supports iOS and Android.

Using #

  // Print US Dollar information
  print(currencies[Iso4217Code.usd]);

The previous command show as output:

Currency{isoCode: USD, fullName: US Dollar, symbol: $, minorUnit: cent, minorFraction: 100}

Supported currencies #

  • Australian Dollar
  • Bulgarian Lev
  • Brazilian Real
  • Canadian Dollar
  • Swiss Franc
  • Chinese Yuan Renminbi
  • Czech Koruna
  • Danish Krone
  • Euro
  • British Pound
  • Hong Kong Dollar
  • Croatian Kuna
  • Hungarian Forint
  • Indonesian Rupiah
  • Israeli Shekel
  • Indian Rupee
  • Icelandic Krona
  • Japanese Yen
  • South Korean Won
  • Mexican Peso
  • Malaysian Ringgit
  • Norwegian Krone
  • New Zealand Dollar
  • Philippine Peso
  • Polish Zloty
  • Romanian Leu
  • Russian Ruble
  • Swedish Krona
  • Turkish Lira
  • Thai Baht
  • US Dollar
  • South African Rand

[0.1.1] - 6/10/19

  • Added Chinese Yuan.

[0.1.0] - 6/10/19

  • Added ECB supported forex currencies.

[0.0.3] - 1/9/19

  • Added isoCodeFromStr function.

[0.0.2] - 1/9/19

  • Added ISO 4217 enum.

[0.0.1] - 1/9/19

  • Initial implementation of currencies plugin.

example/main.dart

import 'package:currencies/currencies.dart';

void main(List<String> arguments) {
  // Print US Dollar information
  print(currencies[Iso4217Code.usd]);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  currencies: ^0.1.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:currencies/currencies.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
25
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
98
Overall:
Weighted score of the above. [more]
62
Learn more about scoring.

We analyzed this package on Oct 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:currencies/currencies.dart.

Maintenance suggestions

The package description is too short. (-2 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
meta ^1.1.7 1.1.7
Dev dependencies
mockito ^4.1.0
pedantic ^1.8.0+1
test >=1.3.0 <1.6.8