File tree Expand file tree Collapse file tree 5 files changed +14
-9
lines changed
Expand file tree Collapse file tree 5 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 55## [ 0.1.1] - TODO: Add release date.
66
77* TODO: Fixed clean input
8+
9+
10+ ## [ 0.1.2] - TODO: Add release date.
11+
12+ * TODO: Support ` autofocus `
Original file line number Diff line number Diff line change 55## Installing
66
77``` yaml
8- dependencies :
9- flutter :
10- sdk : flutter
118 flutter_verification_code_input :
129 git :
1310 url : git://github.com/tiny-express/flutter_verification_code_input.git
14- version : ^0.1.1
11+ version : ^0.1.2
1512` ` `
1613
1714` ` ` dart
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class _MyHomePageState extends State<MyHomePage> {
4545 VerificationCodeInput (
4646 keyboardType: TextInputType .number,
4747 length: 4 ,
48+ autofocus: false ,
4849 onCompleted: (String value) {
4950 print (value);
5051 setState (() {
Original file line number Diff line number Diff line change @@ -5,16 +5,18 @@ class VerificationCodeInput extends StatefulWidget {
55 final TextInputType keyboardType;
66 final int length;
77 final double itemSize;
8- BoxDecoration itemDecoration;
9- TextStyle textStyle;
8+ final BoxDecoration itemDecoration;
9+ final TextStyle textStyle;
10+ final bool autofocus;
1011 VerificationCodeInput (
1112 {Key key,
1213 this .onCompleted,
1314 this .keyboardType = TextInputType .number,
1415 this .length = 4 ,
1516 this .itemDecoration,
1617 this .itemSize = 50 ,
17- this .textStyle = const TextStyle (fontSize: 25.0 , color: Colors .black)})
18+ this .textStyle = const TextStyle (fontSize: 25.0 , color: Colors .black),
19+ this .autofocus = true })
1820 : assert (length > 0 ),
1921 assert (itemSize > 0 ),
2022 super (key: key);
@@ -106,7 +108,7 @@ class _VerificationCodeInputState extends State<VerificationCodeInput> {
106108 maxLengthEnforced: true ,
107109 autocorrect: false ,
108110 textAlign: TextAlign .center,
109- autofocus: true ,
111+ autofocus: widget.autofocus ,
110112 style: widget.textStyle,
111113 );
112114 }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: flutter_verification_code_input
22author : loinp <nploi1998@gmail.com>
33homepage : https://github.com/tiny-express/flutter_verification_code_input
44description : A Flutter package that help you create a verification input.
5- version : 0.1.1
5+ version : 0.1.2
66
77environment :
88 sdk : " >=2.1.0 <3.0.0"
You can’t perform that action at this time.
0 commit comments