Showing
1 changed file
with
15 additions
and
1 deletions
@@ -543,10 +543,24 @@ extension GetNavigation on GetInterface { | @@ -543,10 +543,24 @@ extension GetNavigation on GetInterface { | ||
543 | int id, | 543 | int id, |
544 | bool preventDuplicates = true, | 544 | bool preventDuplicates = true, |
545 | }) { | 545 | }) { |
546 | + Get.parameters.forEach((key, value) async { | ||
547 | + if (await page.contains('?')) { | ||
548 | + page = "$page${"&$key=$value"}"; | ||
549 | + } else { | ||
550 | + page = "$page${"?$key=$value"}"; | ||
551 | + } | ||
552 | + }); | ||
553 | + // Get.parameters.clear(); | ||
546 | if (preventDuplicates && page == currentRoute) { | 554 | if (preventDuplicates && page == currentRoute) { |
547 | return null; | 555 | return null; |
548 | } | 556 | } |
549 | - return global(id)?.currentState?.pushNamed<T>(page, arguments: arguments); | 557 | + // Get.parameters.clear(); |
558 | + return global(id) | ||
559 | + ?.currentState | ||
560 | + ?.pushNamed<T>(page, arguments: arguments) | ||
561 | + ?.then((_) { | ||
562 | + Get.parameters.clear(); | ||
563 | + }); | ||
550 | } | 564 | } |
551 | 565 | ||
552 | /// **Navigation.pushReplacementNamed()** shortcut.<br><br> | 566 | /// **Navigation.pushReplacementNamed()** shortcut.<br><br> |
-
Please register or login to post a comment