copyWith method
StackRouterInheritedData
copyWith({
- void pushRoute(
- String route
- void popRoute([
- String route
- void switchRoute(
- String route
- void showSnackBar({
- String? route,
- required StackRouterSnackBar snackBar,
- void clearSnackBars({
- String? route,
- void hideSnackBar({
- String? route,
- String? currentRoute,
- String? route,
- List<
String> ? routeHistory, - dynamic addMessenger({
- required StackRouterScaffoldMessenger messenger,
- required String route,
- void onPop()?,
- Widget? child,
- bool? canPop,
Implementation
StackRouterInheritedData copyWith({
void Function(String route)? pushRoute,
void Function([String route])? popRoute,
void Function(String route)? switchRoute,
void Function({
String? route,
required StackRouterSnackBar snackBar,
})?
showSnackBar,
void Function({String? route})? clearSnackBars,
void Function({String? route})? hideSnackBar,
String? currentRoute,
String? route,
List<String>? routeHistory,
Function({
required String route,
required StackRouterScaffoldMessenger messenger,
})?
addMessenger,
void Function()? onPop,
Widget? child,
bool? canPop,
}) {
return StackRouterInheritedData(
child: child ?? this.child,
routeHistory: routeHistory ?? this.routeHistory,
popRoute: popRoute ?? this.popRoute,
pushRoute: pushRoute ?? this.pushRoute,
switchRoute: switchRoute ?? this.switchRoute,
showSnackBar: showSnackBar ?? this.showSnackBar,
clearSnackBars: clearSnackBars ?? this.clearSnackBars,
hideSnackBar: hideSnackBar ?? this.hideSnackBar,
addMessenger: addMessenger ?? this.addMessenger,
route: route ?? this.route,
onPop: onPop ?? this.onPop,
canPop: canPop ?? this.canPop,
);
}