VirtualKeyboard constructor

const VirtualKeyboard({
  1. Key? key,
  2. required VirtualKeyboardType type,
  3. required TextEditingController textController,
  4. Widget builder(
    1. BuildContext context,
    2. VirtualKeyboardKey key
    )?,
  5. double height = _virtualKeyboardDefaultHeight,
  6. Color textColor = Colors.black,
  7. double fontSize = 20,
  8. bool alwaysCaps = false,
  9. required RegExp exp,
})

Creates a new instance of the VirtualKeyboard.

type specifies the keyboard layout type (numeric, alphanumeric, symbolic, or dual). textController is the TextEditingController to control the text input field. builder is an optional custom builder function for individual keys. height is the height of the virtual keyboard (default: 300). textColor specifies the text color (default: black). fontSize sets the font size of the keyboard keys (default: 20). alwaysCaps determines whether the keyboard always shows capital letters (default: false). exp is a regular expression to validate the text input.

Implementation

const VirtualKeyboard({
  super.key,
  required this.type,
  required this.textController,
  this.builder,
  this.height = _virtualKeyboardDefaultHeight,
  this.textColor = Colors.black,
  this.fontSize = 20,
  this.alwaysCaps = false,
  required this.exp,
});