defineScroll<R> method

AppRoute<R, ScrollerArgs> defineScroll<R>(
  1. String routePath, {
  2. String? name,
  3. required WidgetHandler<R, ScrollerArgs> handler,
  4. TransitionType? transitionType,
})

Creates an AppPageRoute definition whose arguments are Map<String, dynamic>

Implementation

AppRoute<R, ScrollerArgs> defineScroll<R>(String routePath,
    {String? name,
    required WidgetHandler<R, ScrollerArgs> handler,
    TransitionType? transitionType}) {
  return register<R, ScrollerArgs, AppPageRoute<R, ScrollerArgs>>(
    AppPageRoute(routePath, handler, (_) => ScrollerArgs.from(_),
        name: name,
        transitionType: transitionType,
        toRouteUri: (settings) => routePath),
  );
}