Skip to content

A customizable numeric keypad like those found on P.O.S equipment (P.D.V in Brazil)

License

Notifications You must be signed in to change notification settings

diogoroos/flutter_keyboard

Repository files navigation

flutter_keyboard

pub package

Easily display a numeric keypad like those found on P.O.S (P.D.V in Brazil) equipment. Works on Android, iOS, Web, Windows, Linux and Mac.
Cloned and improved from the numeric_keyboard package.

Installation

Add flutter_keyboard: ^2.0.0 in your pubspec.yaml dependencies. And import it:

import 'package:flutter_keyboard/flutter_keyboard.dart';

How to use

Simply create a FlutterKeyboard widget and pass the required params:

FlutterKeyboard(
  onKeyboardTap: _onKeyboardTap
)

_onKeyboardTap(String value) {
  setState(() {
    text = text + value;
  });
}

Params

FlutterKeyboard(
  onKeyboardTap: _onKeyboardTap,
  characters: const ['1', '2', '3', 'A', 'B', 'C', '!', '@', '#'],
  footerMiddleCharacter: '💡',
  itemsPerRow: 3,
  getAllSpace: true,
  externalPaddingButtons: const EdgeInsets.all(12),
  buttonsDecoration: BoxDecoration(
    borderRadius: BorderRadius.circular(12),
    color: Colors.blue,
  ),
  footerRightAction: () {
    setState(() {
      textCtrl.text = textCtrl.text.substring(0, textCtrl.text.length - 1);
    });
  },
  footerRightChild: Container(
    alignment: Alignment.center,
    width: 50,
    height: 50,
    child: const Icon(Icons.backspace),
  ),
),
)

For a more detail example please take a look at the example folder.

Example

Flutter keyboard:

-

If something is missing, feel free to open a ticket or contribute!

About

A customizable numeric keypad like those found on P.O.S equipment (P.D.V in Brazil)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published