KeyboardLayouts constructor

KeyboardLayouts({
  1. Key? key,
  2. required TextEditingController textEditingController,
  3. required FocusNode focusNode,
  4. required bool isKeyboardOpen,
  5. KeyboardLanguages currentKeyboardLanguage = KeyboardLanguages.english,
  6. bool enableLanguageButton = false,
  7. Color keysBackgroundColor = Colors.white,
  8. Color keyboardBackgroundColor = Colors.white70,
  9. double keyElevation = 0,
  10. Color keyShadowColor = Colors.black,
  11. BorderRadius? keyBorderRadius,
  12. TextStyle keyTextStyle = const TextStyle(color: Colors.black, fontSize: 15),
  13. KeyboardAction keyboardAction = KeyboardAction.actionDone,
  14. Function? keyboardActionDoneEvent,
  15. 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;
  }
}