updateEvents method
Implementation
void updateEvents(T renderViewModel, Set<EventHolder> holders) {
if (holders.isNotEmpty) {
for (var holder in holders) {
switch (holder.eventName) {
case NativeGestureHandle.kClick:
renderViewModel.setClickable(holder.isAdd);
break;
case NativeGestureHandle.kLongClick:
renderViewModel.setLongClickable(holder.isAdd);
break;
case NativeGestureHandle.kTouchDown:
renderViewModel.setTouchDownHandle(holder.isAdd);
break;
case NativeGestureHandle.kTouchMove:
renderViewModel.setTouchMoveHandle(holder.isAdd);
break;
case NativeGestureHandle.kTouchEnd:
renderViewModel.setTouchEndHandle(holder.isAdd);
break;
case NativeGestureHandle.kTouchCancel:
renderViewModel.setTouchCancelHandle(holder.isAdd);
break;
case NativeGestureHandle.kShow:
renderViewModel.setAttachedToWindowHandle(holder.isAdd);
break;
case NativeGestureHandle.kDismiss:
renderViewModel.setDetachedFromWindowHandle(holder.isAdd);
break;
case NativeGestureHandle.kPressIn:
renderViewModel.setCanPressIn(holder.isAdd);
break;
case NativeGestureHandle.kPressOut:
renderViewModel.setCanPressOut(holder.isAdd);
break;
default:
handleExtraEvent(renderViewModel, holder);
break;
}
}
}
}