BadDestination class
Predefined Destination that represents navigation errors. Similar to 404 page for web.
- Mixed in types
- Available Extensions
Constructors
- BadDestination.emptyLocation({String message = "Empty Location", String detail = ""})
-
Destination used when location is given or is empty
factory
- BadDestination.from(RoutePathVisitor visitor)
-
Create BadDestination.unknownLocation from
RoutePathVisitor
It callsvisitor.badLocation
to retrieve the full location string and also mark the visitor as bad location.factory - BadDestination.unknownLocation(String location, {String message = "Unknown Location"})
-
Destination used when the destionation is unknown
factory
- BadDestination.unreachableLocation({required NavigationStack from, required Destination to, String message = "Unreachable Location"})
-
Destination used when the destionation is unreachable
factory
Properties
- detail → String
-
Detailed information about the error, would be useful for debugging
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- message → String
-
Human friendly messsage describing the error
final
- name → String
-
Name of the destination
final
- pageKey → LocalKey
-
The key to identify the page
no setterinherited
- restorationId → String?
-
the restoration id of the page
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parseChildPath(
RoutePathVisitor visitor) → Destination -
Parse child path provided by visitor.
override
-
toLocationParts(
) → Iterable< String> -
convert the destination to location parts, which is later joined into the location string
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryBuildRootStack(
) → Iterable< Destination> ? -
Try to build the desination from root
override
-
Try to build the destination chain from a certain location
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- emptyLocationError → const String
- Error name for BadDestination.emptyLocation
- unknownLocationError → const String
- Error name for BadDestination.unknownLocation
- unreachableLocationError → const String
- Error name for BadDestination.unreachableLocation