iban 0.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 79

iban #

Validate IBANs

Build Status

Usage #

A simple usage example:

import 'package:iban/iban.dart';

main() {
  var iban = 'AT611904300234573201';
  if (isValid(iban)) {
    print('$iban is a valid iban');
  } else {
    print('$iban is not a valid iban');
  }
}

Iban specifications #

The iban specifications are copied from iban.js

See specifications.dart for all available countries.

Contrary to iban.js, which parses the specifications at runtime, all regular expression strings are parsed using specifications_builder.dart.

Please open an issue if you notice that my specifications are out of sync with iban.js or if you know how to build the iban for another country.

Changelog #

0.1.0 #

  • dart 2 support

0.0.1 #

  • Initial version, created by Stagehand

example/iban_example.dart

import 'package:iban/iban.dart';

/// A simple iban example.
int main() {
  var iban = 'AT611904300234573201';
  if (isValid(iban)) {
    print('$iban is a valid iban');
  } else {
    print('$iban is not a valid iban');
  }

  return 0;
}

Use this package as a library

1. Depend on it

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


dependencies:
  iban: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:iban/iban.dart';
  
Version Uploaded Documentation Archive
0.1.0 Jan 8, 2019 Go to the documentation of iban 0.1.0 Download iban 0.1.0 archive
0.0.1 Feb 14, 2017 Go to the documentation of iban 0.0.1 Download iban 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
70
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
79
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, web, other

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

Health suggestions

Format lib/iban.dart.

Run dartfmt to format lib/iban.dart.

Format lib/src/helpers.dart.

Run dartfmt to format lib/src/helpers.dart.

Format lib/src/specification.dart.

Run dartfmt to format lib/src/specification.dart.

Format lib/src/specification_definitions.dart.

Run dartfmt to format lib/src/specification_definitions.dart.

Maintenance issues and suggestions

Use analysis_options.yaml. (-10 points)

Change the name of your package's .analysis_options file to analysis_options.yaml.

Read more about the setup of analysis-options.yaml.

The package description is too short. (-20 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 >=1.0.0 <3.0.0
mod97 >=0.0.1 <1.0.0 0.1.0
Dev dependencies
test >=0.12.0 <2.0.0