flutter_custom_keyboard library
Flutter Custom Keyboard Package
A highly customizable Flutter keyboard widget with modern animations, haptic feedback, and cross-platform support. Perfect replacement for system keyboards in forms, login screens, and search fields.
Quick Start
- Wrap your app with KeyboardScaffold:
MaterialApp(
home: KeyboardScaffold(
child: MyHomePage(),
),
)
- Use one of the smart text field widgets:
// Adaptive field with type selector
AdaptiveTextField(
controller: _controller,
availableTypes: [TextInputType.text, TextInputType.number, TextInputType.emailAddress],
)
// Pre-configured smart fields
SmartTextField.contact(controller: _phoneController) // Phone + Email
SmartTextField.general(controller: _nameController) // Text + Number
SmartTextField.web(controller: _urlController) // Text + Email + URL
// Traditional single-type fields
CustomTextField(
controller: _controller,
keyboardType: TextInputType.number, // Automatic numeric keyboard
)
Features
- Smart Type Detection: Automatically shows appropriate keyboard based on input type
- Adaptive UI: Built-in type selector for multi-purpose input fields
- Modern Design: Beautiful keyboard with gradients and animations
- Cross-platform: Works on Android, iOS, and web
- Multiple layouts: QWERTY, numeric, symbols, email, and URL optimized
- Zero Configuration: Smart defaults that work out of the box
- Haptic feedback: Different vibrations for different keys
- Auto-scrolling: Keeps focused fields visible above keyboard
- Drop-in replacement: Easy migration from standard TextFields
Classes
- AdaptiveTextField
- An adaptive text field that automatically handles keyboard type switching and provides built-in UI for users to select different input types.
- CustomKey
- CustomKeyboard
- CustomTextField
- A custom text field widget that integrates with the custom keyboard.
- GlobalCustomTextField
- A global custom text field widget that integrates with the custom keyboard.
- KeyboardLayouts
- KeyboardManager
- KeyboardScaffold
- A scaffold widget that provides global keyboard management functionality.
- KeyboardState
- KeyboardStateManager
- KeyboardUtils
- Utility functions for integrating custom keyboard with standard Flutter widgets.
- KeyData
- SmartTextField
- A smart text field that provides common input type combinations with sensible defaults for rapid development.