copyWith method

GoRoute copyWith({
  1. String? path,
  2. String? name,
  3. Widget builder(
    1. BuildContext,
    2. GoRouterState
    )?,
  4. String? redirect(
    1. BuildContext,
    2. GoRouterState
    )?,
  5. List<RouteBase>? routes,
})

Implementation

GoRoute copyWith({
  String? path,
  String? name,
  Widget Function(BuildContext, GoRouterState)? builder,
  String? Function(BuildContext, GoRouterState)? redirect,
  List<RouteBase>? routes,
}) {
  return GoRoute(
    path: path ?? this.path,
    name: name ?? this.name,
    builder: builder ?? this.builder,
    redirect: redirect ?? this.redirect,
    routes: routes ?? this.routes,
  );
}