random_number_keypad 1.0.1 copy "random_number_keypad: ^1.0.1" to clipboard
random_number_keypad: ^1.0.1 copied to clipboard

A customizable Flutter widget providing a secure numeric keypad with random key positions, PIN masking, customizable length, and callback on PIN entry completion.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Random Number Keypad Example',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const RandomPinExample(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.lightGreen,
      appBar: AppBar(title: const Text('Random PIN Keyboard')),
      body: Center(
        child: RandomNumberKeypad(
          pinLength: 4,
          onComplete: (pin) {
            print('Entered PIN: $pin');
            // Add PIN validation logic here.
          },
        ),
      ),
    );
  }
}
2
likes
0
points
5
downloads

Publisher

verified publishersivaprasadnk.dev

Weekly Downloads

A customizable Flutter widget providing a secure numeric keypad with random key positions, PIN masking, customizable length, and callback on PIN entry completion.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on random_number_keypad