numpad_kit library

A fully customizable and themeable numeric keypad widget for Flutter.

This library provides a Numpad widget that displays a 3x4 grid of buttons arranged like a phone keypad, with support for custom themes, extra buttons, and keyboard input.

Features

  • 🎨 Fully customizable appearance with theming
  • 🎯 Controller-based state management
  • ⌨️ Keyboard input support (web/desktop)
  • 📱 Cross-platform compatibility
  • 🔧 Custom button builder support
  • ♿ Accessibility compliant

Basic Usage

import 'package:numpad_kit/numpad_kit.dart';

Numpad(
  controller: NumpadController(
    onInput: (value) => print('Input: $value'),
    onSubmit: (value) => print('Submitted: $value'),
  ),
)

Custom Theme

NumpadTheme(
  data: NumpadThemeData(
    buttonColor: Colors.blue,
    buttonTextColor: Colors.white,
    buttonShape: NumpadButtonShape.circle,
  ),
  child: Numpad(controller: myController),
)

Classes

Numpad
A customizable numeric keypad widget.
NumpadButton
A button widget used in the numpad.
NumpadConstants
Default constants for the numpad widget.
NumpadController
A controller for managing numpad input state and interactions.
NumpadTheme
An inherited widget that defines the visual properties for numpad widgets in this widget's subtree.
NumpadThemeData
Defines the visual properties of a numpad.

Enums

NumpadButtonShape
Defines the shape of numpad buttons.

Typedefs

NumpadButtonBuilder = Widget Function(BuildContext context, String value, VoidCallback onPressed, bool isEnabled)
A typedef for building custom numpad buttons.