pin_entry_text_field 0.1.4 pin_entry_text_field: ^0.1.4 copied to clipboard
Fully customizable Pin Entry TextField for flutter, This widget accepts pin of any length and it detects the entry of the last pin.
example/pin_entry_text_field_example.dart
import 'package:flutter/material.dart';
import 'package:pin_entry_text_field/pin_entry_text_field.dart';
class ExamplePinEntry extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Pin Entry Example"),
),
body: Container(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: PinEntryTextField(
showFieldAsBox: true,
onSubmit: (String pin){
showDialog(
context: context,
builder: (context){
return AlertDialog(
title: Text("Pin"),
content: Text('Pin entered is $pin'),
);
}
); //end showDialog()
}, // end onSubmit
), // end PinEntryTextField()
), // end Padding()
), // end Container()
);
}
}