Skip to content

Dennis-Mwea/flutter_iban_tools

Repository files navigation

Flutter IBANTools

License

GitHub last commit GitHub contributors GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests

No deps

About

Flutter IBANTools is Flutter/Dart library for validation, creation and extraction of IBAN, BBAN and BIC/SWIFT numbers. Inspired by Simplify/ibantools

For more information about IBAN/BBAN see wikipedia page and IBAN registry.

For more information about BIC/SWIFT see this wikipedia page.

Installation

Flutter/Dart

$ flutter pub add flutter_iban_tools

Usage

See full documentation with examples on Github pages.

Flutter/Dart

import 'package:flutter_iban_tools/flutter_iban_tools.dart' as ibantools;

void main() {
  final String? iban = electronicFormatIBAN('NL91 ABNA 0417 1643 00'); // 'NL91ABNA0517164300'
  ibantools.isValidIBAN(iban);
  
  // If you want to know reason why IBAN is invalid
  ibantools.validateIBAN('NL91ABNA0517164300'); 
  // Returns { valid: false, errorCodes: [iban.ValidationErrorsIBAN.WrongIBANChecksum] }

  // Validate BIC
  ibantools.isValidBIC('ABNANL2A');
}

Extension

Country specifications can be extended with national BBAN validations by calling setCountryBBANValidation.

Example implementation coming soon

Contributing

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code.

For contribution details, please read this document.

License

This work is dual-licensed under MIT and MPL-2.0. You can choose between one of them if you use this work.

SPDX-License-Identifier: MIT OR MPL-2.0

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published