flutter pass-code
a flutter widget for entering a pass-code.
this widget allows you to customize the number of characters, background and border colors, and obscure text.
example
import 'package:flutter/material.dart';
import 'package:passcode/passcode.dart';
void main() => runapp(myapp());
class myapp extends statelesswidget {
@override
widget build(buildcontext context) {
return materialapp(
home: scaffold(
appbar: appbar(),
body: center(
child: column(
mainaxisalignment: mainaxisalignment.center,
children: <widget>[
passcodetextfield(
ontextchanged: (passcode) {
print(passcode);
},
totalcharacters: 4,
bordercolor: colors.black,
passcodetype: passcodetype.number,
),
],
),
),
),
);
}
}
Comments are closed.