ALFBeamerDelegate class

Inheritance

Constructors

ALFBeamerDelegate.new({required String initialPath, required Map<String, BeamLocation<RouteInformationSerializable> Function(RouteInformation)> locations})

Properties

active bool
If false, does not report the route until next update.
getter/setter pairinherited
beamBackTransitionDelegate TransitionDelegate
A transition delegate to be used by Navigator when beaming back.
finalinherited
beamingHistory List<BeamLocation<RouteInformationSerializable>>
The history of BeamLocations, each holding its BeamLocation.history.
finalinherited
beamingHistoryCompleteLength int
Returns the complete length of beaming history, that is the sum of all history lengths for each BeamLocation in beamingHistory.
no setterinherited
buildListener → void Function(BuildContext, BeamerDelegate)?
The buildListener will be called every time after the currentPages are updated. it receives a reference to this delegate.
finalinherited
canBeamBack bool
Whether it is possible to beamBack, i.e. there is more than 1 entry in beamingHistoryCompleteLength.
no setterinherited
canPopBeamLocation bool
Whether it is possible to popBeamLocation, i.e. there is more than 1 location in beamingHistory.
no setterinherited
clearBeamingHistoryOn Set<String>
Whether to remove all entries from beamingHistory (and their nested BeamLocation.history) when a route belonging to this set is reached, regardless of how it was reached.
finalinherited
configuration RouteInformation
A state of this delegate. This is the routeInformation that goes into locationBuilder to build an appropriate BeamLocation.
getter/setter pairinherited
currentBeamLocation → BeamLocation<RouteInformationSerializable>
A BeamLocation that is currently responsible for providing a page stack via BeamLocation.buildPages and holds the current BeamState.
no setterinherited
currentConfiguration RouteInformation?
Called by the Router when it detects a route information may have changed as a result of rebuild.
no setterinherited
currentPages List<BeamPage>
currentBeamLocation's "effective" pages, the ones that were built.
no setterinherited
guards List<BeamGuard>
Guards that will be executing BeamGuard.check on currentBeamLocation candidate.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
initializeFromParent bool
Whether to take configuration from parent when this is created.
finalinherited
initialPath String
The path to replace / as default initial route path upon load.
finalinherited
locationBuilder → LocationBuilder
A builder for BeamLocations.
finalinherited
The Navigator that belongs to this BeamerDelegate.
no setterinherited
The key used for retrieving the current navigator.
no setterinherited
The list of observers for the Navigator.
finalinherited
notFoundPage ↔ BeamPage
Page to show when no BeamLocation supports the incoming URI.
getter/setter pairinherited
notFoundRedirect → BeamLocation<RouteInformationSerializable>?
BeamLocation to redirect to when no BeamLocation supports the incoming URI.
finalinherited
notFoundRedirectNamed String?
URI string to redirect to when no BeamLocation supports the incoming URI.
finalinherited
onPopPage bool Function(BuildContext context, Route route, dynamic result)?
Callback when pop is requested.
getter/setter pairinherited
parent ↔ BeamerDelegate?
A delegate of a parent of the Beamer that has this delegate.
getter/setter pairinherited
preferUpdate bool
finalinherited
removeDuplicateHistory bool
Whether to remove BeamLocations from beamingHistory if they are the same type as the location being beamed to.
finalinherited
root → BeamerDelegate
The top-most BeamerDelegate, a parent of all.
no setterinherited
routeListener → void Function(RouteInformation, BeamerDelegate)?
The routeListener will be called on every navigation event and will receive the configuration and a reference to this delegate.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setBrowserTabTitle bool
Whether the title attribute of BeamPage should be used to set and update the browser tab title.
finalinherited
transitionDelegate TransitionDelegate
A transition delegate to be used by Navigator.
finalinherited
updateFromParent bool
Whether to call update when parent notifies listeners.
finalinherited
updateListenable Listenable?
A Listenable to which an update listener will be added, i.e. update will be called when listeners are notified.
finalinherited
updateParent bool
Whether to call update on parent when this instance's configuration is updated.
finalinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
beamBack({Object? data, bool replaceRouteInformation = false}) bool
Beams to previous entry in beamingHistory. and removes the last entry from history.
inherited
beamTo(BeamLocation<RouteInformationSerializable> location, {Object? data, BeamLocation<RouteInformationSerializable>? popTo, TransitionDelegate? transitionDelegate, bool beamBackOnPop = false, bool popBeamLocationOnPop = false, bool stacked = true, bool replaceRouteInformation = false}) → void
Beams to a specific, manually configured BeamLocation.
inherited
beamToNamed(String uri, {Object? routeState, Object? data, String? popToNamed, TransitionDelegate? transitionDelegate, bool beamBackOnPop = false, bool popBeamLocationOnPop = false, bool stacked = true, bool replaceRouteInformation = false}) → void
Configures and beams to a BeamLocation that supports uri within its BeamLocation.pathPatterns.
inherited
beamToReplacement(BeamLocation<RouteInformationSerializable> location, {Object? data, BeamLocation<RouteInformationSerializable>? popTo, TransitionDelegate? transitionDelegate, bool beamBackOnPop = false, bool popBeamLocationOnPop = false, bool stacked = true}) → void
The same as beamTo, but replaces the last state in history, i.e. removes it from the beamingHistory.last.history and then does beamTo.
inherited
beamToReplacementNamed(String uri, {Object? routeState, Object? data, String? popToNamed, TransitionDelegate? transitionDelegate, bool beamBackOnPop = false, bool popBeamLocationOnPop = false, bool stacked = true}) → void
The same as beamToNamed, but replaces the last state in history, i.e. removes it from the beamingHistory.last.history and then does beamToNamed.
inherited
build(BuildContext context) Widget
Called by the Router to obtain the widget tree that represents the current state.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
popBeamLocation({Object? data, bool replaceRouteInformation = false}) bool
Beams to previous location in beamingHistory and removes the last location from history.
inherited
popRoute() Future<bool>
Called by the Router when the Router.backButtonDispatcher reports that the operating system is requesting that the current route be popped.
inherited
popToNamed(String uri, {Object? routeState, Object? data, String? popToNamed, bool beamBackOnPop = false, bool popBeamLocationOnPop = false, bool stacked = true, bool replaceRouteInformation = false}) → void
Calls beamToNamed with a ReverseTransitionDelegate and tries to remove everything from history after entry corresponding to uri, as if doing a pop way back to that state, if it exists in history.
inherited
removeFirstHistoryElement() → HistoryElement?
Removes the first element from beamingHistory and returns it.
inherited
removeLastHistoryElement() → HistoryElement?
Removes the last element from beamingHistory and returns it.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setInitialRoutePath(RouteInformation configuration) SynchronousFuture<void>
Called by the Router at startup with the structure that the RouteInformationParser obtained from parsing the initial route.
inherited
setNewRoutePath(RouteInformation configuration) SynchronousFuture<void>
Called by the Router when the Router.routeInformationProvider reports that a new route has been pushed to the application by the operating system.
inherited
setRestoredRoutePath(RouteInformation configuration) Future<void>
Called by the Router during state restoration.
inherited
takePriority() → void
Takes priority over all other siblings, i.e. sets itself as active and all other siblings as inactive.
inherited
toString() String
A string representation of this object.
inherited
update({RouteInformation? configuration, BeamParameters? beamParameters, Object? data, bool buildBeamLocation = true, bool rebuild = true, bool updateParent = true, bool updateRouteInformation = true, bool replaceRouteInformation = false, bool takePriority = true}) → void
Main method to update the configuration of this delegate and its currentBeamLocation.
inherited
updateRouteInformation(RouteInformation routeInformation) → void
Pass this call to root which notifies the platform for a configuration change.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited