off method
Future<T?>
off(
- Widget page(), {
- bool? opaque,
- Transition? transition,
- Curve? curve,
- Duration? duration,
- String? id,
- String? routeName,
- bool fullscreenDialog = false,
- Object? arguments,
- List<
BindingsInterface> bindings = const <BindingsInterface>[], - bool preventDuplicates = true,
- bool? popGesture,
- bool showCupertinoParallax = true,
- double gestureWidth(
- BuildContext context
override
Navigates off the current page and returns a result of type T
.
Implementation
@override
Future<T?> off(
Widget Function() page, {
bool? opaque,
Transition? transition,
Curve? curve,
Duration? duration,
String? id,
String? routeName,
bool fullscreenDialog = false,
Object? arguments,
List<BindingsInterface> bindings = const <BindingsInterface>[],
bool preventDuplicates = true,
bool? popGesture,
bool showCupertinoParallax = true,
double Function(BuildContext context)? gestureWidth,
}) async {
routeName = cleanRouteName("/${page.runtimeType}");
final GetPage<T> route = GetPage<T>(
name: routeName,
opaque: opaque ?? true,
page: page,
gestureWidth: gestureWidth,
showCupertinoParallax: showCupertinoParallax,
popGesture: popGesture ?? Get.defaultPopGesture,
transition: transition ?? Get.defaultTransition,
curve: curve ?? Get.defaultTransitionCurve,
fullscreenDialog: fullscreenDialog,
bindings: bindings,
transitionDuration: duration ?? Get.defaultTransitionDuration,
);
final PageSettings args = _buildPageSettings(routeName, arguments);
return _replace(args, route);
}