fulde_keyboard

Last updated:

0 purchases

fulde_keyboard Image
fulde_keyboard Images
Add to Cart

Description:

fulde keyboard

fulde_keyboard #
About #
A simple package for dispaying virtual keyboards on a devices like kiosks and ATMs. The library is written in Dart and has no native code dependancy.
This project has forked from virtual_keyboard project because the virtual_keyboard project built to only display a buttons on the screen with single language. However, this project will handel the events and aill supports multi-languages.
Feature and TODO List #

(Done) Multi-langugae support.
(Done) Customizable layout.
(Done) Option to make a popup floating keyboard/keyNum.
(Done) Adding onLongPress spacebar pop widget to select another keyboard.
(ToDo) Adding Arabic and Hausa keyboards (Rabi'at font).
(ToDo) Optimization.
(ToDo) Adding input result viewer and handel the events.
(ToDo) Adding Spell checker.














Reference #
FuldeKeyboard #
Flutter widget to show virtual keyboards.
// Keyboard Type: Can be Numeric or Alphanumeric.
FuldeKeyboardType type
copied to clipboard
// Callback for Key press event. Called with pressed `Key` object.
Function onKeyPress;
copied to clipboard
// Virtual keyboard height. Default is 300.
double height;
copied to clipboard
/// Virtual keyboard height. Default is full screen width
double width;
copied to clipboard
// Color for key texts and icons.
Color textColor;
copied to clipboard
// Font size for keyboard keys.
double fontSize;;
copied to clipboard
// Only Caps letters enabled.
bool alwaysCaps;;
copied to clipboard
/// the custom layout for multi or single language
FuldeKeyboardLayoutKeys customLayoutKeys;
copied to clipboard
/// used for multi-languages with default layouts, the default is English only
/// will be ignored if customLayoutKeys is not null
List<FuldeKeyboardDefaultLayouts> defaultLayouts;
copied to clipboard
/// inverse the layout to fix the issues with right to left languages, default is false.
bool reverseLayout;
copied to clipboard
FuldeKeyboardType #
enum of Available Virtual Keyboard Types.
// Numeric only.
FuldeKeyboardType.Numeric
copied to clipboard
// Alphanumeric: letters`[A-Z]` + numbers`[0-9]` + `@` + `.`.
FuldeKeyboardType.Alphanumeric
copied to clipboard
FuldeKeyboardKey #
Virtual Keyboard key.
// The text of the key.
String text
copied to clipboard
// The capitalized text of the key.
String capsText;
copied to clipboard
// Action or String
FuldeKeyboardKeyType keyType;
copied to clipboard
// Action of the key.
FuldeKeyboardKeyAction action;
copied to clipboard
FuldeKeyboardKeyType #
Type for virtual keyboard key.
// Can be an action key - Return, Backspace, etc.
FuldeKeyboardKeyType.Action
copied to clipboard
// Keys that have text values - letters, numbers, comma ...
FuldeKeyboardKeyType.String
copied to clipboard
FuldeKeyboardKeyAction #
/// Virtual keyboard actions.
enum FuldeKeyboardKeyAction { Backspace, Return, Shift, Space }
copied to clipboard
Usage #
Show Alphanumeric keyboard with default view
// Wrap the keyboard with Container to set background color.
Container(
// Keyboard is transparent
color: Colors.deepPurple,
child: FuldeKeyboard(
// Default height is 300
height: 350,
// Default height is will screen width
width: 600,
// Default is black
textColor: Colors.white,
// Default 14
fontSize: 20,
// the layouts supported
defaultLayouts = [FuldeKeyboardDefaultLayouts.English],
// [A-Z, 0-9]
type: FuldeKeyboardType.Alphanumeric,
// Callback for key press event
onKeyPress: _onKeyPress),
)
copied to clipboard
Show Numeric keyboard with default view
Container(
// Keyboard is transparent
color: Colors.red,
child: FuldeKeyboard(
// [0-9] + .
type: FuldeKeyboardType.Numeric,
// Callback for key press event
onKeyPress: (key) => print(key.text)),
)
copied to clipboard
Show Alphanumeric keyboard with customized keys
Container(
color: Colors.deepPurple,
child: FuldeKeyboard(
height: keyboardHeight,
textColor: Colors.white,
fontSize: 20,
builder: _builder,
type: FuldeKeyboardType.Numeric,
onKeyPress: _onKeyPress),
)

/// Builder for keyboard keys.
Widget _builder(BuildContext context, FuldeKeyboardKey key) {
Widget keyWidget;

switch (key.keyType) {
case FuldeKeyboardKeyType.String:
// Draw String key.
keyWidget = _keyboardDefaultKey(key);
break;
case FuldeKeyboardKeyType.Action:
// Draw action key.
keyWidget = _keyboardDefaultActionKey(key);
break;
}

return keyWidget;
}
copied to clipboard
onKeyPressed event basic ussage example
// Just local variable. Use Text widget or similar to show in UI.
String text;

/// Fired when the virtual keyboard key is pressed.
_onKeyPress(FuldeKeyboardKey key) {
if (key.keyType == FuldeKeyboardKeyType.String) {
text = text + (shiftEnabled ? key.capsText : key.text);
} else if (key.keyType == FuldeKeyboardKeyType.Action) {
switch (key.action) {
case FuldeKeyboardKeyAction.Backspace:
if (text.length == 0) return;
text = text.substring(0, text.length - 1);
break;
case FuldeKeyboardKeyAction.Return:
text = text + '\n';
break;
case FuldeKeyboardKeyAction.Space:
text = text + key.text;
break;
case FuldeKeyboardKeyAction.Shift:
shiftEnabled = !shiftEnabled;
break;
default:
}
}
// Update the screen
setState(() {});
}
copied to clipboard

Muhammad Buhari
Ma'aruf Mohammed Adam
Rilwan Adedeji
LICENSE - MIT

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.