otpify 0.1.6 copy "otpify: ^0.1.6" to clipboard
otpify: ^0.1.6 copied to clipboard

retracted

Otpify is a customizable OTP input field widget for Flutter, adapts to different mobile screen sizes. It includes a resend code timer button for added convenience.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      darkTheme: ThemeData.dark(
        useMaterial3: true,
      ),
      theme: ThemeData.light(
        useMaterial3: true,
      ),
      home: Home(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Otpify Demo'),
      ),
      body: Otpify(
        fields: 5,
        resendSecond: 15,
        borderRadiusValue: 16,
        resendAlignment: ResendAlignment.start,
        resendText: 'Resend code',
        resendDisableColor: Colors.grey[600],
        onChanged: (value) {
          /// Perform action on field change.
        },
        onCompleted: (code) {
          /// Assign [code] to your TextController to get the full code.
        },
        onResend: () {
          /// Initiate OnResendEvent()
        },
      ),
    );
  }
}
5
likes
0
points
37
downloads

Publisher

unverified uploader

Weekly Downloads

Otpify is a customizable OTP input field widget for Flutter, adapts to different mobile screen sizes. It includes a resend code timer button for added convenience.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on otpify