RouteNodeEquality class sealed

Strategy for comparing two RouteNode instances for equality.

Different strategies include or exclude certain fields (RouteNode.route, RouteNode.arguments, RouteNode.extra, RouteNode.children). Pick the narrowest strategy that still reflects the equality you need.

Example

const equality = RouteNodeEquality.routeAndArguments();
final same = equality.equals(nodeA, nodeB);
Annotations
  • @experimental

Constructors

RouteNodeEquality.deep()
Compares nodes by RouteNode.route, RouteNode.arguments, RouteNode.extra and RouteNode.children, recursively.
const
factory
RouteNodeEquality.route()
Compares nodes by RouteNode.route only.
const
factory
RouteNodeEquality.routeAndArguments()
Compares nodes by RouteNode.route and RouteNode.arguments.
const
factory
RouteNodeEquality.routeAndArgumentsAndExtra()
Compares nodes by RouteNode.route, RouteNode.arguments and RouteNode.extra.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

equals(RouteNode e1, RouteNode e2) bool
Compare two elements for being equal.
inherited
hash(RouteNode e) int
Get a hashcode of an element.
inherited
isValidKey(Object? o) bool
Test whether an object is a valid argument to equals and hash.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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