easy_split_go_router 0.1.2
easy_split_go_router: ^0.1.2 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.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.