-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(lib/get_navigation): Improve preventDuplicates and preventDuplicateHandlingMode in navigator2 #3262
base: master
Are you sure you want to change the base?
Conversation
fix: #3261 |
1. using preventDuplicates option of Get Navigation - to、off、offNamed、offUntil、backAndtoNamed、 - toNamed、offNamedUntil、toNamedAndOffUntil 2. merge preventDuplicates option in _configureRouterDecoder API 3. execute _activePages.add(res) when route.preventDuplicates == false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thank you for this change. Could you please change the value to false by default?
@@ -690,6 +691,7 @@ extension GetNavigationExt on GetInterface { | |||
String? id, | |||
dynamic arguments, | |||
Map<String, String>? parameters, | |||
bool preventDuplicates = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this value should be false by default
@@ -629,6 +629,7 @@ extension GetNavigationExt on GetInterface { | |||
dynamic arguments, | |||
String? id, | |||
Map<String, String>? parameters, | |||
bool preventDuplicates = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEM
@@ -702,6 +704,7 @@ extension GetNavigationExt on GetInterface { | |||
id: id, | |||
arguments: arguments, | |||
parameters: parameters, | |||
preventDuplicates: preventDuplicates, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEM
@@ -722,6 +725,7 @@ extension GetNavigationExt on GetInterface { | |||
String? id, | |||
dynamic result, | |||
Map<String, String>? parameters, | |||
bool preventDuplicates = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEM
@@ -1003,11 +1008,13 @@ extension GetNavigationExt on GetInterface { | |||
bool Function(GetPage) predicate, [ | |||
Object? arguments, | |||
String? id, | |||
bool preventDuplicates = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEM
String page, { | ||
T? result, | ||
Object? arguments, | ||
bool preventDuplicates = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEM
@@ -521,9 +527,13 @@ class GetDelegate extends RouterDelegate<RouteDecoder> | |||
dynamic arguments, | |||
String? id, | |||
Map<String, String>? parameters, | |||
bool preventDuplicates = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEM
@@ -541,9 +551,13 @@ class GetDelegate extends RouterDelegate<RouteDecoder> | |||
dynamic arguments, | |||
String? id, | |||
Map<String, String>? parameters, | |||
bool preventDuplicates = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEM
@@ -554,10 +568,14 @@ class GetDelegate extends RouterDelegate<RouteDecoder> | |||
String page, | |||
bool Function(GetPage) predicate, [ | |||
Object? data, | |||
bool preventDuplicates = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEM
@@ -573,12 +591,17 @@ class GetDelegate extends RouterDelegate<RouteDecoder> | |||
Widget Function() page, | |||
bool Function(GetPage) predicate, [ | |||
Object? arguments, | |||
bool preventDuplicates = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDEM
support merge preventDuplicateHandlingMode by copyWith (GetPage)
add and using preventDuplicates option of Getx5 Navigator2 API
merge preventDuplicates option in _configureRouterDecoder API
execute _activePages.add(res) when route.preventDuplicates == false
Pre-launch Checklist