flutter_navkit 1.0.2
flutter_navkit: ^1.0.2 copied to clipboard
A powerful navigation toolkit for Flutter with type-safe routing, automatic route generation, and comprehensive navigation observability.
1.0.2 #
π Initial Release #
β οΈ Note: This release was re-published because the wrong README file was uploaded in the previous attempt.
No code changes were made β only documentation was corrected.
β¨ Features
- NavkitApp Widget β Drop-in replacement for
MaterialAppwith built-in navigation observer. - Automatic Route Generation β Use
@NavkitRoute()annotation to auto-generate type-safe route constants. - NavkitObserver β Full navigation tracking with:
- Route stack visualization in debug mode
- Clean console logging with emojis (β‘οΈ Push, β¬ οΈ Pop, π Remove, π Replace)
hasRoute()to check existing routes in the stack- Optional stack printing via
observeWithStack
π Navigation Extensions
Normal Navigation (Widget-Based):
context.push()context.pushReplacementTo()context.pushAndRemoveAll()context.pop()context.popToFirst()context.maybePop()context.canPop
Named Navigation (Route-Based):
context.pushRoute()context.pushReplacementRoute()context.popAndPushRoute()context.pushAndRemoveAllRoute()context.popTo()context.tryPushRoute()context.tryPopTo()
π§ Code Generation
@NavkitRouteannotation for marking screens- Optional
routeNameoverride - Auto-generated
NavkitRoutesclass - Full build_runner integration
π¦ Package Structure
NavkitAppβ main entry widgetNavkitObserverβ advanced route observer@NavkitRouteβ annotation for route generation- Navigation extensions on
BuildContext
π― Developer Experience
- Type-safe navigation with autocomplete
- Zero-boilerplate route management
- Intuitive API following Flutterβs patterns
- Detailed debug logging
- Fully compatible with Flutterβs Navigator 1.0
π Documentation
- Updated README (fixed in this release)
- Full usage examples
- In-depth API explanations
- Example project included