otp_paste_field 0.0.3 copy "otp_paste_field: ^0.0.3" to clipboard
otp_paste_field: ^0.0.3 copied to clipboard

A Flutter widget for OTP input with paste functionality.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:otp_paste_field/otp_paste_field.dart';
// Import your OtpPasteField file

void main() {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'OTP Paste Field Demo',
      home: HomeScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
          centerTitle: true,
          title: SizedBox(
            height: 50,
            width: MediaQuery.of(context).size.width,
            child: const Card(
                elevation: 10,
                child: Center(
                    child: Text(
                  'OTP Paste Field Demo ',
                  style: TextStyle(
                      color: Color.fromARGB(255, 3, 34, 136),
                      fontSize: 20,
                      fontWeight: FontWeight.bold),
                ))),
          )),
      body: const Center(
          child: OtpFieldView(
        borderRadius: 20,
        focusedBorderColor: Color.fromARGB(255, 3, 34, 136),
        borderColor: Color.fromARGB(255, 3, 34, 136),
        otpLength: 6,
      )),
    );
  }
}
6
likes
0
points
10
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter widget for OTP input with paste functionality.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on otp_paste_field