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

You use Number Pad (with. random)

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

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

class _MyAppState extends State<MyApp> {

  String code = "";

  @override
  void initState() {
    super.initState();
    NumberPad.shuffle();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Number Pad app'),
        ),
        body: Column(
          children: [
            GestureDetector(
              onTap: (){
                print(33);
                NumberPad.shuffle();
              },
              child: Center(
                child: Text("code = ${code}"),
              ),
            ),
            const Spacer(),
            NumberPad(
              onChange: (value){
                setState(() {
                  print(value);
                  code = value;
                });
              },
            )
          ],
        ),
      ),
    );
  }
}
5
likes
120
pub points
49%
popularity

Publisher

unverified uploader

You use Number Pad (with. random)

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on number_pad