pushFor<T> abstract method

List<Future<T?>> pushFor<T>(
  1. BuildContext context,
  2. int numberOfPagesToPush, {
  3. required Widget currentPage,
})

You can push multiple pages at once with pushFor.

This method guarantees that you will never push beyond the last Participator page.

// Pushes 4 pages.

dynamicRoutesParticipator.pushFor(context, 4);

// Pushes to the last participator page.
dynamicRoutesParticipator.pushFor(context, dynamicRoutesParticipator..getProgressFromCurrentPage());


// Pushes to the last participator page + invoke [lastPageCallback].
dynamicRoutesParticipator.pushFor(context, dynamicRoutesParticipator..getProgressFromCurrentPage() + 1);

Implementation

List<Future<T?>> pushFor<T>(BuildContext context, int numberOfPagesToPush,
    {required Widget currentPage});