iban_form_field 0.1.8

  • Readme
  • Changelog
  • Example
  • Installing
  • 80

A Flutter widget for capturing IBANs.

It features several features:

  • Paste detection of IBANs
  • Automatic field advancement
  • Country specific hints

Usage #

See the example directory.

Integration testing #

For your integrations tests the TextFormFields have distinct keys:

  • 'iban-form-field-country-code'
  • 'iban-form-field-check-digits'
  • 'iban-form-field-basic-bank-account-number'

Features and bugs #

Please file feature requests and bugs at the issue tracker.

v0.1.8

  • Disable digit grouping on Android

v0.1.7

  • Fix indexing bug

v0.1.6

  • Add keys to TextFormFields for testing

v0.1.5

  • Fix bug in hintText
  • Remove numeric keyboard for check digits

v0.1.4

  • Add toPrintFormat and decent electronicFormat methods

v0.1.3

  • Add validation error

v0.1.2

  • Fix botched 0.1.1 release

v0.1.1

  • Reformat in groups of 4 after paste
  • Add electronicFormat to IBAN object
  • Add isValid to IBAN object
  • Dynamic hint text for country code field

v0.1.0

  • Initial release

example/README.md

Using the widget is easy:

class Example extends StatefulWidget {
  @override
  _ExampleState createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  Iban _iban;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Form(
              key: _formKey,
              child: IbanFormField(
                onSaved: (iban) => _iban = iban,
                initialValue: Iban('NL'),
              ),
            ),
            RaisedButton(
              child: Text('show'),
              onPressed: () {
                _formKey.currentState.save();
                showDialog(
                  context: context,
                  builder: (context) {
                    return AlertDialog(
                      content: Text(_iban.toString()),
                    );
                  },
                );
              },
            ),
          ],
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  iban_form_field: ^0.1.8

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support 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:iban_form_field/iban_form_field.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
60
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
80
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0
flutter 0.0.0
iban ^0.1.0 0.1.1
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
mod97 0.1.0
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test
pedantic ^1.7.0
test ^1.6.0