frankfurter 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

Frankfurter #

A dart library to use the Frankfurter currency conversion service.

Frankfurter is an open source API that uses the European Central Bank to update currency conversion rates on a regular basis and exposes these rates through a simple API.

By default this library uses the API, but you can deploy your own instance of Frankfurter and connect to that instead.

Changelog #

1.0.0 #

  • Change .getRate(from, to) to named arguments: .getRate(from: x, to: y)

0.0.2 #

  • Add .getRate() function that uses a simple cache.

0.0.1 #

  • First working version that allows getting the latest rates.


import 'package:frankfurter/frankfurter.dart';

void main() async {
  final frankfurter = Frankfurter();

  final latest = await frankfurter.latest(from: Currency('EUR'));

  final rate = await frankfurter.getRate(
    from: Currency('EUR'),
    to: Currency('GBP'),
  print('Single conversion: $rate');

Use this package as a library

1. Depend on it

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

  frankfurter: ^1.0.0

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:frankfurter/frankfurter.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.13


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
http ^0.12.0 0.12.1
logging ^0.11.0 0.11.4
meta ^1.1.0 1.2.1
Transitive dependencies
charcode 1.1.3
collection 1.14.13 1.15.0-nnbd
http_parser 3.1.4
path 1.7.0
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0 1.3.0-nnbd
Dev dependencies
grind_publish ^1.0.0
grinder ^0.8.3
mockito ^4.0.0
pedantic ^1.9.0 1.9.1
test ^1.3.0