flutter_verification_code 1.1.7 copy "flutter_verification_code: ^1.1.7" to clipboard
flutter_verification_code: ^1.1.7 copied to clipboard

A Flutter package that help you create a verification input.

flutter_verification_code Pub #

After install, in your Dart code, you can use:

import 'package:flutter_verification_code/flutter_verification_code.dart';
copied to clipboard

Usage #

  VerificationCode(
    textStyle: TextStyle(fontSize: 20.0, color: Colors.red[900]),
    keyboardType: TextInputType.number,
    underlineColor: Colors.amber, // If this is null it will use primaryColor: Colors.red from Theme
    length: 4,
    cursorColor: Colors.blue, // If this is null it will default to the ambient
    // clearAll is NOT required, you can delete it
    // takes any widget, so you can implement your design
    clearAll: Padding(
      padding: const EdgeInsets.all(8.0),
      child: Text(
        'clear all',
        style: TextStyle(fontSize: 14.0, decoration: TextDecoration.underline, color: Colors.blue[700]),
      ),
    ),
    onCompleted: (String value) {
      setState(() {
        _code = value;
      });
    },
    onEditing: (bool value) {
      setState(() {
        _onEditing = value;
      });
      if (!_onEditing) FocusScope.of(context).unfocus();
    },
  ),
copied to clipboard
onEditing: (bool value) {
  setState(() {
    _onEditing = value;
  });
},
copied to clipboard
Center(
  child: (_onEditing != true)
      ? Text('Your code: $_code')
      : Text('Please enter full code'),
),
copied to clipboard

How to use feature with pasting a code #

The example is here https://github.com/awaik/flutter_verification_code/issues/23

Full example is here https://github.com/awaik/flutter_verification_code/tree/master/example

Showcase #

Image|100x100, 10%

Image|100x100, 10%

Credits #

This is a project by Agoradesk, P2P cryptocurrency trading platform. Created by the team behind LocalMonero, the biggest and most trusted Monero P2P trading platform.

158
likes
150
points
3.61k
downloads

Publisher

verified publisheragoradesk.com

Weekly Downloads

2024.09.14 - 2025.03.29

A Flutter package that help you create a verification input.

Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on flutter_verification_code