squid 0.1.0
squid: ^0.1.0 copied to clipboard
A simple, reliable and extensible declarative navigator for Flutter. The whole navigation is a plain list of routes you can rewrite at any moment.
Changelog #
All notable changes to this project will be documented in this file.
Unreleased #
- Docs: "Helpers of your application" — an extension type over
BuildContextwith application specific shortcuts andpopModals, which closes the declarative and the imperative popups at once. - Docs: "Deep links" — the initial link from the binding, the links received while running, and three ways to parse a link into a stack.
- Example:
context.nav,popModalsand deep links with tests. - Fixed: the system back button now reaches the deepest visible nested
NavigationViewfirst; previously the outer view closed the whole nested flow at once. - Fixed: a nested
NavigationViewcovered by a route or a dialog of the outer navigator no longer reacts to the back button, andinterceptBackButton: falsedisables the nested views as well. - Fixed:
Navigator.pop(context, result)completespushForResultwithresultinstead ofnull. - Fixed: a route closed by the user and kept by a guard is brought back on screen instead of leaving the navigator out of sync with the controller.
- Fixed: a
pushForResultrequested from a listener, a guard or an observer and then rejected by a guard completes withnullinstead of never. - Fixed: the result of a
popcancelled by a guard is no longer delivered by a later removal of the same route, and a postponedpopbinds its result to the route it actually removes. - Fixed: disposing the controller from an observer no longer applies the remaining queued changes to a disposed controller.
- Fixed: a
ContextGuardchanging the stack when the window size, the theme or a scope changes no longer throwssetState() or markNeedsBuild() called during buildin a widget above the view that listens to the controller (e.g. the shell of the tabs): the view renders the new stack in the same frame, the listeners are notified at the end of it. - Changed:
onBackButtonPressedis called only when the press reaches the view: not for an inactive tab and not when a nested view has handled it.NavigationScopeis no longer aconstconstructor. - Fixed:
GateGuardwith an open gate replaces an empty stack withopened(), the same way a closed gate falls back toclosed(). - Fixed: replacing the controller of a
NavigationViewruns its guards with the context of the view, so aContextGuardsees it immediately.
0.1.0 #
- Initial release.
NavigationRoute— a route is an immutable value: anenumvalue when it has no parameters, asealed classwhen it has.NavigationController— the owner of the stack, usable without any widget, with guards, observers and revalidation built in.NavigationView— renders a controller with aNavigator, reports the routes closed by the user and handles the system back button.DialogRouteMixinandBottomSheetRouteMixin— dialogs and bottom sheets as ordinary entries of the navigation stack.NavigationGuardwith the built-inPriorityGuard,RootGuard,LimitGuardandGateGuard.ContextGuard— the rules that depend on the widget tree (the size of the window, the theme, an inherited scope) re-run by themselves whenever what they read changes.NavigationObserverandNavigationLogger.NavigationTabsController— several stacks side by side, cross tab navigation and automatic routing of the back button.