pinput 0.1.2 copy "pinput: ^0.1.2" to clipboard
pinput: ^0.1.2 copied to clipboard

outdated

100% Dart based PIN input field widget for Flutter, this widget accepts string os any length and calls the onSubmit method when all fields are filled.

PinPut #

100% Dart based PIN input fiels for Flutter

Overview #

This widget accepts string os any length and calls the onSubmit method when all fields are filled.

drawing

Contents: #

Installation #

Install the latest version from pub.

Example #

Import the package:

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

void main() => runApp(new PinPutTest());

class PinPutTest extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        theme: ThemeData(primaryColor: Colors.green, hintColor: Colors.green),
        home: Scaffold(
            body: Builder(
          builder: (context) => Center(
                child: PinPut(
                  onSubmit: (pin) => _showSnackBar(pin, context),
                ),
              ),
        )));
  }

  void _showSnackBar(String pin, context) {
    final snackBar = SnackBar(
      duration: Duration(seconds: 5),
      content: Container(
          height: 80.0,
          child: Center(
            child: Text(
              'Pin Submitted. Value: $pin',
              style: TextStyle(fontSize: 25.0),
            ),
          )),
      backgroundColor: Colors.greenAccent,
    );
    Scaffold.of(context).showSnackBar(snackBar);
  }
}

Properties: #

Property Default
onSubmit Function
fieldsCount 4
isTextObscure false
fontSize 40.0
borderRadius 5.0
keybaordType number
keyboardAction next
2476
likes
0
pub points
99%
popularity

Publisher

verified publisherfman.ge

100% Dart based PIN input field widget for Flutter, this widget accepts string os any length and calls the onSubmit method when all fields are filled.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on pinput