diff --git a/package/lib/src/beamer_delegate.dart b/package/lib/src/beamer_delegate.dart index 5c13d27..8d4804b 100644 --- a/package/lib/src/beamer_delegate.dart +++ b/package/lib/src/beamer_delegate.dart @@ -546,9 +546,13 @@ class BeamerDelegate extends RouterDelegate bool popBeamLocationOnPop = false, bool stacked = true, bool replaceRouteInformation = false, + Map? queryParameters, }) { update( - configuration: RouteInformation(location: uri, state: routeState), + configuration: RouteInformation( + location: constructUri(uri, queryParameters), + state: routeState, + ), beamParameters: _currentBeamParameters.copyWith( popConfiguration: popToNamed != null ? RouteInformation(location: popToNamed) : null, @@ -573,10 +577,11 @@ class BeamerDelegate extends RouterDelegate bool beamBackOnPop = false, bool popBeamLocationOnPop = false, bool stacked = true, + Map? queryParameters, }) { removeLastHistoryElement(); beamToNamed( - uri, + constructUri(uri, queryParameters), routeState: routeState, data: data, popToNamed: popToNamed, @@ -604,10 +609,12 @@ class BeamerDelegate extends RouterDelegate bool popBeamLocationOnPop = false, bool stacked = true, bool replaceRouteInformation = false, + Map? queryParameters, }) { + final fullUri = constructUri(uri, queryParameters); while (beamingHistory.isNotEmpty) { final index = beamingHistory.last.history.lastIndexWhere( - (element) => element.routeInformation.location == uri, + (element) => element.routeInformation.location == fullUri, ); if (index == -1) { _disposeBeamLocation(beamingHistory.last); @@ -620,7 +627,7 @@ class BeamerDelegate extends RouterDelegate } } beamToNamed( - uri, + fullUri, routeState: routeState, data: data, popToNamed: popToNamed,