next<T> method
This method is never called on the last page, rather,
lastPageCallback
is called instead.
Implementation
@override
@mustCallSuper
Future<T?> next<T>(NextArguments args) =>
Navigator.of(args.context).push(MaterialPageRoute(
settings: RouteSettings(name: args.nextPage.hashCode.toString()),
builder: (_) => args.nextPage));