layouts library
Layout, language, and initialization APIs for virtual_keypad.
Import this library when you want to work directly with built-in layouts, register custom languages, or switch languages at runtime without pulling in the full widget surface.
Common Tasks
- Call initializeKeyboardLayouts during app startup.
- Use KeyboardLayoutProvider to read or change the active language.
- Define KeyboardLanguage and KeyboardLayoutSet for custom languages.
- Build custom layouts with VirtualKey, KeyRow, and KeyboardLayout.
Classes
- KeyboardLanguage
- Defines all keyboard layouts for a specific language.
- KeyboardLayoutProvider
- Manages keyboard languages and provides access to layouts.
- KeyboardLayoutSet
- A complete set of keyboard layouts for a specific input type.
- VirtualKey
- Represents a single key on the virtual keyboard.
Enums
- KeyAction
- Actions that can be performed by special keys on the keyboard.
- KeyboardInputType
- Simplified input type categories for layout selection.
- KeyboardType
- Keyboard input types that determine the layout shown.
- KeyType
- The type of a virtual keyboard key.
- LayoutStage
- Current layout stage for keyboards with multiple pages.
Properties
- arabicLanguage → KeyboardLanguage
-
Arabic (العربية) keyboard language.
final
- bengaliLanguage → KeyboardLanguage
-
Bengali (বাংলা) keyboard language.
final
- decimalLayout → KeyboardLayout
-
Decimal number layout (0-9 with decimal point, no extra characters).
final
- emailLayoutPrimary → KeyboardLayout
-
Email keyboard - primary layout with @ readily accessible.
Similar to standard QWERTY but with @ and . on the bottom row.
final
- emailLayoutSecondary → KeyboardLayout
-
Email keyboard - secondary layout (numbers & symbols).
final
- emailLayoutTertiary → KeyboardLayout
-
Email keyboard - tertiary layout (more symbols).
final
- englishLanguage → KeyboardLanguage
-
English (QWERTY) keyboard language.
final
- frenchLanguage → KeyboardLanguage
-
French (AZERTY) keyboard language.
final
- germanLanguage → KeyboardLanguage
-
German (QWERTZ) keyboard language.
final
- hindiLanguage → KeyboardLanguage
-
Hindi (हिन्दी) keyboard language.
final
- koreanLanguage → KeyboardLanguage
-
Korean (한국어) keyboard language — Dubeolsik (두벌식) layout.
final
- numberLayout → KeyboardLayout
-
Standard number pad layout (0-9 with decimal).
final
- phoneLayout → KeyboardLayout
-
Phone dialer layout with standard phone pad characters.
final
- phoneSimpleLayout → KeyboardLayout
-
Simple phone layout (just numbers and basic symbols).
final
- portugueseLanguage → KeyboardLanguage
-
Portuguese (QWERTY) keyboard language.
final
- russianLanguage → KeyboardLanguage
-
Russian (ЙЦУКЕН/JCUKEN) keyboard language.
final
- signedNumberLayout → KeyboardLayout
-
Signed number pad layout (includes - for negative numbers).
final
- spanishLanguage → KeyboardLanguage
-
Spanish (QWERTY) keyboard language.
final
- textLayoutPrimary → KeyboardLayout
-
Standard QWERTY text layout - primary (letters).
final
- textLayoutSecondary → KeyboardLayout
-
Text layout - secondary (numbers & common symbols).
final
- textLayoutTertiary → KeyboardLayout
-
Text layout - tertiary (more symbols).
final
- thaiLanguage → KeyboardLanguage
-
Thai (ไทย) keyboard language — Kedmanee layout.
final
- turkishLanguage → KeyboardLanguage
-
Turkish (Q-keyboard) keyboard language.
final
- urlLayoutPrimary → KeyboardLayout
-
URL keyboard - primary layout with common URL characters accessible.
Has .com, /, : readily available on the bottom row.
final
- urlLayoutSecondary → KeyboardLayout
-
URL keyboard - secondary layout (numbers & symbols).
final
- urlLayoutTertiary → KeyboardLayout
-
URL keyboard - tertiary layout (more symbols).
final
Functions
-
initializeKeyboardLayouts(
) → void - Initialize the provider with default languages.
Typedefs
-
KeyboardLayout
= List<
KeyRow> - A complete keyboard layout consisting of multiple rows.
-
KeyRow
= List<
VirtualKey> - A row of keys in a keyboard layout.