iban_to_bic 2.2.0 copy "iban_to_bic: ^2.2.0" to clipboard
iban_to_bic: ^2.2.0 copied to clipboard

Determines the SWIFT BIC of an IBAN (AT, BE, DE, ES, FR, LT, LU, NL). Zero runtime dependencies.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:iban_to_bic/iban_to_bic.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Async variant needs no preload:
  final IbanLookupResult result =
      await ibanToBicAsync('DE64 5001 0517 9423 8144 35');

  switch (result) {
    case BicFound(:final Bic bic):
      debugPrint('BIC: ${bic.value}');
      debugPrint('Bank name: ${bic.bankShortName}');
      debugPrint('Postcode: ${bic.bankPostcode}');
      debugPrint('Location: ${bic.bankLocation}');
    case InvalidIban(:final String iban, :final InvalidIbanReason reason):
      debugPrint('Invalid IBAN ($reason): $iban');
    case UnsupportedCountry(:final String countryCode):
      debugPrint('Unsupported country: $countryCode');
    case UnknownBank(:final String countryCode, :final String bankCode):
      debugPrint('Unknown bank $bankCode in $countryCode');
    case NotPreloaded(:final String countryCode):
      debugPrint('Country $countryCode not preloaded (only reachable via '
          'lookupSync).');
  }
}
0
likes
160
points
645
downloads

Documentation

API reference

Publisher

verified publisherrobertmainzer.de

Weekly Downloads

Determines the SWIFT BIC of an IBAN (AT, BE, DE, ES, FR, LT, LU, NL). Zero runtime dependencies.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on iban_to_bic