updateEvents method

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

Implementation

@override
void updateEvents(
  ViewPagerRenderViewModel renderViewModel,
  Set<EventHolder> holders,
) {
  super.updateEvents(renderViewModel, holders);
  if (holders.isNotEmpty) {
    for (var holder in holders) {
      switch (holder.eventName) {
        case kEventOnPageSelected:
          setOnPageSelected(renderViewModel, holder.isAdd);
          break;
        case kEventOnPageScroll:
          setOnPageScroll(renderViewModel, holder.isAdd);
          break;
        case kEventOnPageScrollStateChanged:
          setOnPageScrollStateChanged(renderViewModel, holder.isAdd);
          break;
      }
    }
  }
}