Seafarer class

seafarer manages routing, registering routes with transitions, navigating to routes, closing routes. It is a thin layer on top of Navigator to help you encapsulate and manage routing at one place.

Constructors

Seafarer({SeafarerOptions options = const SeafarerOptions(isLoggingEnabled: true)})

Properties

hashCode int
The hash code for this object.
no setterinherited
no setter
no setter
options SeafarerOptions
Configuration options for seafarer.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addRoute(SeafarerRoute route) → void
Add a new route to seafarer.
addRoutes(List<SeafarerRoute> routes) → void
Add a list of routes at once.
call<T>(String name, {BaseArguments? args, NavigationType navigationType = NavigationType.push, dynamic result, bool removeUntilPredicate(Route route)?, List<SeafarerTransition>? transitions, Duration? transitionDuration, Map<String, dynamic>? params, CustomSeafarerTransition? customTransition}) Future<T>
Makes this a callable class. Delegates to navigate.
generator() RouteFactory
Generates the RouteFactory which builds a Route on request.
getRegisteredRouteNames() List<String>
Get the registered routes names as a list.
Function used to navigate pages.
Push multiple routes at the same time.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pop([dynamic result]) → void
Delegation for Navigator.pop.
popUntil(bool predicate(Route)) → void
Delegation for Navigator.popUntil.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

args<T extends BaseArguments?>(BuildContext context) → T?
Retrieves the arguments passed in when calling the navigate function.
param<T>(BuildContext context, String key) → T?
unknownRouteGenerator() RouteFactory