duck_router library
Classes
-
DuckPage<
T> Custom pages and transitions - DuckPage allows you to create a custom page, such as a modal, with DuckRouter, and can provide more control over the transition and behavior of a page.
- DuckRestorer
- A DuckRestorer allows restoration of Location objects upon e.g. an app restart.
- DuckRouter Configuration Deep linking Custom pages and transitions
- Creates a DuckRouter.
- DuckRouterConfiguration
- A configuration object for the DuckRouter.
- DuckShell
- The DuckShell is a Widget that manages state for a StatefulLocation. It allows switching between the children of that location.
- DuckShellState
- The state for the DuckShell.
- FlowLocation
- A FlowLocation allows creation of a flow of locations, wrapped inside an optional container.
- InheritedDuckRouter
- DuckRouter implementation of InheritedWidget.
- Location
- A location in the app.
- LocationInterceptor
- A location interceptor acts as a guard for a Location, preventing a user from navigating to that location depending on certain conditions, for example if the user is not logged in.
-
LocationMatch<
T> - A match for a location, containing some extra context around the location.
- LocationStack
- A stack of locations.
- LocationStackCodec
- A Codec for encoding and decoding a LocationStack.
- StatefulLocation
- A location that maintains its own state with the use of a Navigator. A StatefulLocation hosts its children in individually separate navigation stacks. Specify how the children are built using childBuilder. Customize the wrapping container all children live in via containerBuilder.
Typedefs
-
DuckRouterDeepLinkHandler
= List<
Location> ? Function(Uri uri, Location currentLocation) - Handler for when the app gets a deeplink.
- A listener for when the router navigates.
- A builder that creates a list of NavigatorObservers. A builder has to be provided, as a NavigatorObserver can not be shared between navigators. The builder is called with the navigator key of the navigator that the observers are for. Note that the observers returned by the builder should not be shared between navigators!
- DuckRouterShellBuilder = Widget Function(BuildContext context, Widget child)
- A builder for a shell around the DuckRouter.
- LocationBuilder = Widget Function(BuildContext context)
- A builder that creates a widget for a location.
- LocationPageBuilder = DuckPage Function(BuildContext context)
- A builder that allows a fully custom Page to be built. We call these custom pages DuckPage.
- LocationPredicate = bool Function(Location location)
- Signature for the DuckRouter.popUntil predicate argument.
- StatefulLocationBuilder = Widget Function(BuildContext context, DuckShell shell)
- A builder that creates a widget for a stateful location.
- StatefulLocationPageBuilder = DuckPage Function(BuildContext context, LocationBuilder builder)
-
TransitionBuilder
= Widget Function(BuildContext context, Animation<
double> animation, Animation<double> secondaryAnimation, Widget child)