beamTo method
void
beamTo(
- BeamLocation<
RouteInformationSerializable> location, { - Object? data,
- BeamLocation<
RouteInformationSerializable> ? popTo, - TransitionDelegate? transitionDelegate,
- bool beamBackOnPop = false,
- bool popBeamLocationOnPop = false,
- bool stacked = true,
- bool replaceRouteInformation = false,
Beams to a specific, manually configured BeamLocation.
For example
Beamer.of(context).beamTo(
Location2(
BeamState(
pathBlueprintSegments = ['user',':userId','transactions'],
pathParameters = {'userId': '1'},
queryParameters = {'perPage': '10'},
data = {'favoriteUser': true},
),
),
);
See update for more details.
Implementation
void beamTo(
BeamLocation location, {
Object? data,
BeamLocation? popTo,
TransitionDelegate? transitionDelegate,
bool beamBackOnPop = false,
bool popBeamLocationOnPop = false,
bool stacked = true,
bool replaceRouteInformation = false,
}) {
_beamLocationCandidate = location;
update(
configuration: location.state.routeInformation,
beamParameters: _currentBeamParameters.copyWith(
popConfiguration: popTo?.state.routeInformation,
transitionDelegate: transitionDelegate ?? this.transitionDelegate,
beamBackOnPop: beamBackOnPop,
popBeamLocationOnPop: popBeamLocationOnPop,
stacked: stacked,
),
data: data,
buildBeamLocation: false,
replaceRouteInformation: replaceRouteInformation,
);
}