attach method

  1. @override
Widget? attach(
  1. BuildContext context,
  2. ViewPagerController controller
)
override

Implementation

@override
Widget? attach(BuildContext context, ViewPagerController controller) {
  return PageView.builder(
    scrollDirection: controller.orientation,
    onPageChanged: controller.onPageChange,
    controller: controller.pager,
    itemCount: controller.size,
    itemBuilder: (context, index) {
      return controller.items[index];
    },
  );
}