iban_form_field 0.1.0 copy "iban_form_field: ^0.1.0" to clipboard
iban_form_field: ^0.1.0 copied to clipboard

outdated

An IBAN form which deals with spacing and country specific rules.

example/lib/main.dart

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

import 'package:example/result.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flutter IBAN Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: Example());
  }
}

final _formKey = GlobalKey<FormState>();

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: Form(
          key: _formKey,
          child: IbanFormField(
            onSaved: (iban) => _iban = iban,
            initialValue: Iban('NL'),
          ),
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          _formKey.currentState.save();
          Navigator.push(
            context,
            MaterialPageRoute(
              builder: (context) => Result(
                _iban,
              ),
            ),
          );
        },
        child: Icon(Icons.arrow_forward),
      ),
    );
  }
}
7
likes
0
pub points
75%
popularity

Publisher

verified publishermindshards.net

An IBAN form which deals with spacing and country specific rules.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, iban

More

Packages that depend on iban_form_field