updateEvents method

  1. @override
void updateEvents(
  1. TextInputRenderViewModel renderViewModel,
  2. Set<EventHolder> holders
)
override

Implementation

@override
void updateEvents(
  TextInputRenderViewModel renderViewModel,
  Set<EventHolder> holders,
) {
  super.updateEvents(renderViewModel, holders);
  if (holders.isNotEmpty) {
    for (var holder in holders) {
      switch (holder.eventName) {
        case kEventOnFocus:
          setOnFocus(renderViewModel, holder.isAdd);
          break;
        case kEventOnBlur:
          setOnBlur(renderViewModel, holder.isAdd);
          break;
        case kEventOnChangeText:
          setOnChangeText(renderViewModel, holder.isAdd);
          break;
        case kEventOnKeyboardWillShow:
          setOnKeyboardWillShow(renderViewModel, holder.isAdd);
          break;
        case kEventOnKeyboardWillHide:
          setOnKeyboardWillHide(renderViewModel, holder.isAdd);
          break;
        case kEventOnEndEditing:
          setOnEndEditing(renderViewModel, holder.isAdd);
          break;
        case kEventOnSelectionChange:
          setOnSelectionChange(renderViewModel, holder.isAdd);
          break;
      }
    }
  }
}