Committed by
GitHub
Merge pull request #1 from enghitalo/master
Solve test problems
Showing
1 changed file
with
11 additions
and
5 deletions
| @@ -543,17 +543,23 @@ extension GetNavigation on GetInterface { | @@ -543,17 +543,23 @@ 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) { | ||
| 547 | - if (page.contains('?')) { | ||
| 548 | - page = page + "&$key=$value"; | 546 | + Get.parameters.forEach((key, value) async { |
| 547 | + if (await page.contains('?')) { | ||
| 548 | + page = "$page${"&$key=$value"}"; | ||
| 549 | } else { | 549 | } else { |
| 550 | - page = page + "?$key=$value"; | 550 | + page = "$page${"?$key=$value"}"; |
| 551 | } | 551 | } |
| 552 | }); | 552 | }); |
| 553 | if (preventDuplicates && page == currentRoute) { | 553 | if (preventDuplicates && page == currentRoute) { |
| 554 | return null; | 554 | return null; |
| 555 | } | 555 | } |
| 556 | - return global(id)?.currentState?.pushNamed<T>(page, arguments: arguments); | 556 | + // Get.parameters.clear(); |
| 557 | + return global(id) | ||
| 558 | + ?.currentState | ||
| 559 | + ?.pushNamed<T>(page, arguments: arguments) | ||
| 560 | + ?.then((_) { | ||
| 561 | + Get.parameters.clear(); | ||
| 562 | + }); | ||
| 557 | } | 563 | } |
| 558 | 564 | ||
| 559 | /// **Navigation.pushReplacementNamed()** shortcut.<br><br> | 565 | /// **Navigation.pushReplacementNamed()** shortcut.<br><br> |
-
Please register or login to post a comment