SimpleRoute class abstract

A route that contains no parameters.

Override the path property to declare the path segment for this route.

class MyRoute extends SimpleRoute {
  const MyRoute();

  @override
  final String path = 'my-route';
}

Constructors

SimpleRoute(String _path)
Create a new SimpleRoute with the given path.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
path String
The path segment for this route, e.g. 'verify-email', used to configure the GoRoute.path for this route.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fullPath() String
Get the full path for this route. e.g. '/my-route'
go(BuildContext context) → void
Navigate to this route.
isActive(GoRouterState state) bool
Determine if this route is active in any way.
inherited
isCurrentRoute(GoRouterState state) bool
Determine if this route is an exact match for the current location.
inherited
isParentRoute(GoRouterState state) bool
Determine if this route is a parent of the current route.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
push<T extends Object?>(BuildContext context) Future<T?>
Push this route onto the stack.
toString() String
A string representation of this object.
inherited

Operators

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

Constants

root → const String
The root route.