BasePath<T> class
Utility class to define a route path.
The path /user/home
must be defined with path /user
and rootPath /home
.
The completePath getter returns the complete path, including rootPath (if its not null).
Example:
- /onboarding
- /onboarding/steps
- /onboarding/steps/email
// Can be defined as:
final root = BasePath('/onboarding');
final steps = BasePath('/steps', root);
final email = BasePath('/email', steps);
// Can be accessed with:
Nav.pushNamed(root);
Nav.pushNamed(steps);
Nav.pushNamed(email);
- Mixed-in types
Constructors
- BasePath.new(String path, [BasePath? rootPath])
-
Creates a BasePath
const
Properties
- completePath → String
-
Retrieve the complete route path
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
path name
no setter
- path → String
-
Current route path
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setteroverride
- relativePath → String
-
Relative path
no setter
- rootPath → BasePath?
-
Parent route path
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited
Methods
-
concate<
S> (BasePath child) → BasePath< S> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prevPath(
[int qtd = 1]) → String -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited