BeamLocation<T extends BeamState> class
abstract
Configuration for a navigatable application region.
Responsible for
- knowing which URIs it can handle: pathBlueprints
- knowing how to build a stack of pages: buildPages
- keeping a state that provides the link between the first 2
Extend this class to define your locations to which you can then beam to.
- Inheritance
-
- Object
- ChangeNotifier
- BeamLocation
- Implementers
Constructors
- BeamLocation([T? state])
Properties
-
guards
→ List<
BeamGuard> -
Guards that will be executing
check
when this gets beamed to.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- pathBlueprints → List
-
Represents the "form" of URI paths supported by this BeamLocation.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state ↔ T
-
A state of this location.
getter/setter pair
- transitionDelegate → TransitionDelegate?
-
A transition delegate to be used by Navigator.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
builder(
BuildContext context, ) → Widget -
Gives the ability to wrap the
navigator
. -
buildPages(
BuildContext context, T state) → List< BeamPage> - Creates and returns the list of pages to be built by the Navigator when this BeamLocation is beamed to or internally inferred.
-
canHandle(
Uri uri) → bool -
Can this handle the
uri
based on its pathBlueprints. -
createState(
BeamState state) → T - How to create state from generic BeamState, that is produced by BeamerDelegate and passed via BeamerDelegate.locationBuilder.
-
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
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
[T copy(T)?, bool rebuild = true]) → void - Update a state via callback receiving the current state. If no callback is given, just notifies BeamerDelegate to rebuild.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited