flutter_verification_code_field 1.0.4 copy "flutter_verification_code_field: ^1.0.4" to clipboard
flutter_verification_code_field: ^1.0.4 copied to clipboard

Flutter verification code input. Primarily used for entering or pasting OTP codes from authorization emails or messages.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_verification_code_field/flutter_verification_code_field.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
            title: const Text('Flutter Verification Code Field Example')),
        body: const Padding(
          padding: EdgeInsets.all(24),
          child: MyCodeInput(),
        ),
      ),
    );
  }
}

class MyCodeInput extends StatelessWidget {
  const MyCodeInput({
    super.key,
  });

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        VerificationCodeField(
            length: 5,
            spaceBetween: 10,
            onFilled: (value) {
              ScaffoldMessenger.of(context).showSnackBar(
                SnackBar(
                  content: Text('$value Submitted successfully! 🎉'),
                ),
              );
            }),
      ],
    );
  }
}
23
likes
140
pub points
78%
popularity

Publisher

verified publisherotakoyi.software

Flutter verification code input. Primarily used for entering or pasting OTP codes from authorization emails or messages.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, flutter_hooks

More

Packages that depend on flutter_verification_code_field