code_confirmation 1.0.2 copy "code_confirmation: ^1.0.2" to clipboard
code_confirmation: ^1.0.2 copied to clipboard

outdated

A widget with numerical keyboard and 4 inputs, usefull for hight secured confirmation with 2 step

code_confirmation #

A Code Confirmation plugins with 4 input and numerical keyboard

Getting Started #

Simple example :

class MyPage extends StatelessWidget {
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        child: CodeConfirmation(),
      ),
    );
  }
}

You can configure some style and listen change and complete :

class MyPage extends StatelessWidget {
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        CodeConfirmation(
        
          // configure input code
          inputCodeTextStyle: TextStyle(fontWeight: FontWeight.bold),
          
          // configure keyboard style
          keyboardButtonBorderColor: Colors.blue,
          keyboardButtonTextStyle: TextStyle(decorationStyle:TextDecorationStyle.double ),
          keyboardIconRemoveColor: Colors.red,
          
          // trigger the value of code when the 4th is set
          onCompleted: (String value) {
            print('-------- print from onComplete MyPage => $value');
          },
          
          // trigger the value of code on each input
          onChanged: (String value) {
            print('-------- print from onChange MyPage => $value');
          },      
        )
      )
    );
  }
}
0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

A widget with numerical keyboard and 4 inputs, usefull for hight secured confirmation with 2 step

Homepage
Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on code_confirmation