BeamState class

Beamer's opinionated state for BeamLocations.

This can be used when one does not desire to define its own state.

Mixed in types

Constructors

BeamState({List<String> pathPatternSegments = const <String>[], Map<String, String> pathParameters = const <String, String>{}, Map<String, String> queryParameters = const <String, String>{}, Object? routeState})
Creates a BeamState with specified properties.
BeamState.fromRouteInformation(RouteInformation routeInformation, {BeamLocation<RouteInformationSerializable>? beamLocation})
Creates a BeamState from given routeInformation.
factory
BeamState.fromUri(Uri uri, {BeamLocation<RouteInformationSerializable>? beamLocation, Object? routeState})
Creates a BeamState from given uri and optional routeState.
factory
BeamState.fromUriString(String uriString, {BeamLocation<RouteInformationSerializable>? beamLocation, Object? routeState})
Creates a BeamState from given uriString and optional routeState.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
pathParameters Map<String, String>
Path parameters from the URI, in the form as it's defined in BeamLocation.pathPatterns.
final
pathPatternSegments List<String>
Path segments of the current URI, in the form as it's defined in BeamLocation.pathPatterns.
final
queryParameters Map<String, String>
Query parameters of the current URI.
final
routeInformation RouteInformation
A convenience method to get RouteInformation from this.
no setterinherited
routeState Object?
An object that will be passed to RouteInformation.state that is stored as a part of browser history entry.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri
Current URI object in the "real form", as it should be shown in browser's URL bar.
no setter
uriBlueprint Uri
Current URI object in the "blueprint form", as it's defined in BeamLocation.pathPatterns.
no setter

Methods

configure() → void
Constructs uriBlueprint and uri.
copyForLocation(BeamLocation<RouteInformationSerializable> beamLocation, Object? routeState) BeamState
Copies this with configuration for specific BeamLocation.
copyWith({List<String>? pathPatternSegments, Map<String, String>? pathParameters, Map<String, String>? queryParameters, Object? routeState}) BeamState
Returns a configured copy of this.
fromRouteInformation(RouteInformation routeInformation) BeamState
Create a state of type T from RouteInformation.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toRouteInformation() RouteInformation
Creates a RouteInformation fro the state of type T.
override
toString() String
A string representation of this object.
inherited

Operators

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