easy_split_go_router 0.2.0
easy_split_go_router: ^0.2.0 copied to clipboard
GoRouter adapter for EasySplit: EasySplitGoRoute turns a GoRoute into a wide-screen split pane with built-in duplicate-route deduplication.
Changelog #
0.2.0 #
pageBuildersupport.EasySplitGoRoutenow accepts eitherbuilderorpageBuilder(exactly one, same asGoRoute). Pages returned frompageBuilderare adapted to the split-awareEasySplitPage:MaterialPage/CupertinoPage:child,key,name,arguments,restorationId,maintainState,fullscreenDialogandallowSnapshottingare preserved;CustomTransitionPage/NoTransitionPage: custom transitions and their durations are preserved and play inside the right pane;EasySplitPage: returned untouched;- other
Pagesubclasses throwArgumentError(their child cannot be extracted).
- Requires
easy_split ^0.2.1, which addstransitionsBuilder,transitionDuration,reverseTransitionDurationandkeytoEasySplitPage. - Deduplication works the same for
pageBuilderroutes.
0.1.4 #
easy_splitconstraint raised to^0.2.0(pane-scopedMediaQuery,onPaneMediaQuery,paneMediaQueryand the state-preserving fold/unfold fix).- No API changes.
0.1.3 #
- Fixed the two deductions on the pub.dev score page:
lib/easy_split_go_router.dartstarted with a dangling library doc comment; the comment is now attached to an explicitlibrary;directive, which restores the static-analysis points.- The
go_routerconstraint is now>=15.0.0 <19.0.0instead of>=13.0.0. ThecaseSensitiveparameter forwarded toGoRouteonly exists since go_router 15.0.0, so the old lower bound broke pana's downgrade analysis; the upper bound keeps the package installable with the latest 18.x.
- No API changes. The minimum supported go_router version is now 15.0.0.
0.1.2 #
- Documentation only: the English/Chinese switch at the top of the README now uses absolute GitHub links, so it is clickable on pub.dev as well as on GitHub.
- No API or behavior changes.
0.1.1 #
- Documentation only: the package description,
README.mdandCHANGELOG.mdare now written in English so the package follows pub.dev conventions. - Added a Chinese README (
README_CN.md) with a language switcher between the English and Chinese versions, and a "Buy Me a Coffee" section in both. - No API or behavior changes.
0.1.0 #
First public release.
Features #
EasySplitGoRoute: a split-paneGoRoute; pages go to the right pane on wide screens and stay full screen on narrow ones, with zero page-code changes.- Duplicate-route deduplication (on by default): pushing a page that is already in the stack converges the
stack to the existing instance and brings it to the top while keeping its state. Can be disabled per route
with
dedupe: false, globally withEasySplit.config.dedupeRepeatedRoutes = false, or customized withsameRoute. fullscreenflag to keep a route always full screen (login, settings, ...).redirect/onExit/caseSensitivepassthrough, so split pages keep route-level guards and leave-confirmation.- Public deduplication helpers
easySplitDuplicateIndexOf(configuration, settings)andeasySplitIsDuplicate(...)for intercepting duplicates before a push with go_router 16.3+onEnter(seeexample/lib/main_on_enter.dart). easySplitDedupeAction(router, settings)to bring an existing page to the top together withAllow(then: ...)in go_router 16.3+.- The example uses
GoRouter(redirect:)plusrefreshListenablefor login gating: unauthenticated navigation is redirected to/login?from=...and returns to the original target after login. - Reuses the
easy_splitconfiguration and split-pane capabilities (EasySplitScope,EasySplit.config.fullscreenRoutes,paneRatio, ...). - Works with go_router 13 and later (no upper bound; tested with 16.3.0 and 18.1.4).
Known limitations #
- Pages inside
ShellRoute/StatefulShellRoutedo not participate in deduplication. - Only "push a new page" is handled;
go/replacekeep GoRouter's native semantics.