Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Volodymyr Buberenko
2020-12-05 16:37:44 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c21bc105b88e8768c7855fa6c84a0abce5afd901
c21bc105
1 parent
cb645f1a
Update comments for offUntil and offNamedUntil
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
lib/get_navigation/src/extension_navigation.dart
lib/get_navigation/src/extension_navigation.dart
View file @
c21bc10
...
...
@@ -2,6 +2,7 @@ import 'dart:ui' as ui;
import
'package:flutter/material.dart'
;
import
'package:flutter/scheduler.dart'
;
import
'../../get_core/get_core.dart'
;
import
'../../get_instance/src/bindings_interface.dart'
;
import
'../../get_utils/get_utils.dart'
;
...
...
@@ -592,11 +593,11 @@ extension GetNavigation on GetInterface {
///
/// Obs: unlike other get methods, this one you need to send a function
/// that returns the widget to the page argument, like this:
/// Get.offUntil(
() => HomePage()
)
/// Get.offUntil(
GetPageRoute(page: () => HomePage()), predicate
)
///
/// [predicate] can be used like this:
/// `Get.until((route) => Get.currentRoute == '/home')`so when you get to home page,
///
/// `Get.offUntil(page, (route) => (route as GetPageRoute).routeName == '/home')`
/// to pop routes in stack until home,
/// or also like this:
/// `Get.until((route) => !Get.isDialogOpen())`, to make sure the dialog
/// is closed
...
...
@@ -617,12 +618,13 @@ extension GetNavigation on GetInterface {
/// as explained in documentation
///
/// [predicate] can be used like this:
/// `Get.until((route) => Get.currentRoute == '/home')`so when you get to home page,
/// or also like
/// `Get.until((route) => !Get.isDialogOpen())`, to make sure the dialog
/// is closed
/// `Get.offNamedUntil(page, (route) => (route as GetPageRoute).routeName == '/home')`
/// to pop routes in stack until home,
/// or like this:
/// `Get.offNamedUntil((route) => !Get.isDialogOpen())`,
/// to make sure the dialog is closed
///
/// Note: Always put a slash on the route
('/page1'), to avoid un
nexpected errors
/// Note: Always put a slash on the route
name ('/page1'), to avoid u
nexpected errors
Future
<
T
>
offNamedUntil
<
T
>(
String
page
,
RoutePredicate
predicate
,
{
...
...
Please
register
or
login
to post a comment