numpad 0.0.2

SDKflutter
Platformandroidioswindowslinuxmacosweb

Numpad for Pincode input on android and ios. Exposes onTap event for the number but 99 for back button. Check example.

Description

Numpad Widget for Pin Input. Feel free to make pull requests and drop suggestions ✌️ .

Parameters
ParamRequiredDefaultTypeDescription
onTap✅nullFunction (int)Triggerred when number is tapped
mainAxisSpacing❌nulldoubleMain Axis Spacing
crossAxisSpacing❌nulldoubleCross Axis Spacing
clearIcon❌Icons.backspaceIconIcon for clear or delete
themeColor❌Colors.greyColortheme color
textStyle❌--TextStyleStyle for Number Text
numItemDecoration❌--DecorationDecoration for number item or button
buttonSize❌30.0doubleSize of button container
backgroundColor❌Colors.whiteColorColor for NumPad background
iconSize❌30.0doubleSize of Country Flag on Input Label

How To Use

  1. Import the package

    import 'package:numpad/numpad.dart';
    
  2. Provide at least the required params

    NumPad(
         onTap: (val) {
         if (val == 99) {
             if (code.isNotEmpty) {
             setState(() {
                 code = code.substring(0, code.length - 1);
             });
             }
         } else {
             setState(() {
             code += "$val";
             });
         }
         print(code);
         },
     ),