phone_otp_verification 1.0.3 copy "phone_otp_verification: ^1.0.3" to clipboard
phone_otp_verification: ^1.0.3 copied to clipboard

This Flutter package is a one-stop solution for apps requiring seamless phone verification and efficient OTP (One-Time Password) verification.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:phone_otp_verification/phone_verification.dart';

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return PhoneVerification(
      isFirstPage: true,
      enableLogo: false,
      themeColor: Colors.blueAccent,
      backgroundColor: Colors.black,
      initialPageText: "Verify Phone Number",
      initialPageTextStyle: const TextStyle(
        color: Colors.white,
        fontSize: 20,
        fontWeight: FontWeight.bold,
      ),
      textColor: Colors.white,
      onSend: (String value) {
        print('Phone number: $value');
      },
      onVerification: (String value) {
        print('OTP: $value');
      },
    );
  }
}
6
likes
140
points
109
downloads

Publisher

verified publisherhorizondevelopers.cloud

Weekly Downloads

This Flutter package is a one-stop solution for apps requiring seamless phone verification and efficient OTP (One-Time Password) verification.

Repository (GitHub)

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, flutter_otp_text_field

More

Packages that depend on phone_otp_verification