itemType

public final Unit itemType<T extends KViewPagerItem<?>>(Function1<Matcher<View>, T> provideItem)

Adds entry that helps KViewPager2 to automatically build child views

To make it work, you need to pass here function (lambda, constructor), that takes matcher and returns instance of your item type. In this case, matcher actually matches root view of your adapter item.

Parameters

provideItem

Function that takes matcher of item's root view and returns instance of item view