KeyboardLayouts constructor
KeyboardLayouts({
- Key? key,
- required TextEditingController textEditingController,
- required FocusNode focusNode,
- required bool isKeyboardOpen,
- KeyboardLanguages currentKeyboardLanguage = KeyboardLanguages.english,
- bool enableLanguageButton = false,
- Color keysBackgroundColor = Colors.white,
- Color keyboardBackgroundColor = Colors.white70,
- double keyElevation = 0,
- Color keyShadowColor = Colors.black,
- BorderRadius? keyBorderRadius,
- TextStyle keyTextStyle = const TextStyle(color: Colors.black, fontSize: 15),
- KeyboardAction keyboardAction = KeyboardAction.actionDone,
- Function? keyboardActionDoneEvent,
- Function? keyboardActionNextEvent,
Implementation
KeyboardLayouts({
Key? key,
required this.textEditingController,
required this.focusNode,
required this.isKeyboardOpen,
this.currentKeyboardLanguage = KeyboardLanguages.english,
this.enableLanguageButton = false,
this.keysBackgroundColor = Colors.white,
this.keyboardBackgroundColor = Colors.white70,
this.keyElevation = 0,
this.keyShadowColor = Colors.black,
this.keyBorderRadius,
this.keyTextStyle = const TextStyle(color: Colors.black, fontSize: 15),
this.keyboardAction = KeyboardAction.actionDone,
this.keyboardActionDoneEvent,
this.keyboardActionNextEvent,
}) : super(key: key) {
/// Setting Keyboard type according to current language
if (currentKeyboardLanguage == KeyboardLanguages.english) {
currentKeyboardsType = KeyboardsTypes.englishLowerCase;
} else if (currentKeyboardLanguage == KeyboardLanguages.urdu) {
currentKeyboardsType = KeyboardsTypes.urduKeyboard2;
} else if (currentKeyboardLanguage == KeyboardLanguages.sindhi) {
currentKeyboardsType = KeyboardsTypes.sindhiKeyboard2;
} else if (currentKeyboardLanguage == KeyboardLanguages.symbolic) {
currentKeyboardsType = KeyboardsTypes.symbolic2;
}
}