navigateToView<T> method
Pushes view
onto the navigation stack
id
is for when you are using nested navigation, as explained in documentation.
If you want the same behavior of ios that pops a route when the user drag, you can set popGesture
to true.
preventDuplicates
will prevent you from pushing a route that you already in, if you want to push anyway,
set to false.
duration
transition duration.
opaque
Whether the route obscures previous routes when the transition is complete.
Implementation
Future<T?>? navigateToView<T>(
Widget view, {
dynamic arguments,
int? id,
bool? opaque,
Curve? curve,
Duration? duration,
bool fullscreenDialog = false,
bool? popGesture,
bool preventDuplicates = true,
@Deprecated('Prefer to use the transitionStyle instead of using this property. This will be removed in the next major version update for stacked.')
Transition? transition,
Transition? transitionStyle,
}) {
return G.Get.to<T?>(
() => view,
arguments: arguments,
id: id,
opaque: opaque,
preventDuplicates: preventDuplicates,
curve: curve,
duration: duration,
fullscreenDialog: fullscreenDialog,
popGesture: popGesture,
transition: transitionStyle?.toGet ?? transition?.toGet,
);
}