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

PlatformAndroid

A package for pin screen & biometric authentication in one package

example/lib/main.dart

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

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: HomeScreen());
  }
}

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

  final TextEditingController textEditingController = TextEditingController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Plugin example app'),
      ),
      body: Center(
        child: Column(
          children: [
            PinInptBiometricAuthenticator(
              controller: textEditingController,
              textFieldLength: 6,
              authResultCallBack: (bool? result) {
                debugPrint("BIOMETRIC RESULT IS `$result`");
                showDialog(
                    context: context,
                    builder: (_) {
                      return const SizedBox(
                        height: 200,
                        width: 200,
                        child: AlertDialog(
                          title: Center(child: Text("Bioemetric Sucess")),
                          content: Text("You have Authenticated Successfully"),
                        ),
                      );
                    });
              },
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
140
pub points
17%
popularity

Publisher

unverified uploader

A package for pin screen & biometric authentication in one package

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on pin_input_biometric_authenticator