-
-
Notifications
You must be signed in to change notification settings - Fork 93
feat: StacNavigator API and navigation documentation #441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add StacNavigator: ergonomic Dart API for navigate actions (pushStac, pushFlutter, pushJson, pushAsset, pushNetwork, pop, popAll, and pushReplacement/pushAndRemoveAll variants). - Export StacNavigator from stac_core actions. - Docs: add concept 'Navigation in Stac' with overview, destinations, StacNavigator usage, navigation styles, and full Dart/JSON examples. - Docs: make Navigate action page API reference only; link to concept for examples. - Movie app: use StacNavigator.pushStac() and StacSetValueAction in home, detail, and onboarding screens. - macOS example: bump Podfile platform to 10.15.
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the
📝 WalkthroughWalkthroughThis PR introduces a new ergonomic navigation API ( Changes
Sequence Diagram(s)sequenceDiagram
participant App as Mobile App
participant Navigator as StacNavigator
participant Action as StacNavigateAction
participant RouteHandler as Navigation Handler
App->>Navigator: pushStac('detail_screen')
Note over Navigator: Create action with<br/>routeName, navigationStyle: push
Navigator->>Action: StacNavigateAction(routeName, push)
Action-->>App: return configured action
App->>RouteHandler: dispatch action
RouteHandler->>RouteHandler: resolve destination<br/>(routeName/widgetJson/asset/network)
RouteHandler->>RouteHandler: execute navigationStyle<br/>(push/pop/replace/clear)
RouteHandler-->>App: navigate to destination
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/stac/pubspec.yaml`:
- Line 28: The pubspec declares go_router: ^17.0.1 but the Flutter SDK lower
bound is still the old constraint; update the Flutter SDK constraint in the
pubspec's environment section (the Flutter SDK lower bound) to >=3.32 to match
go_router 17.0.1 compatibility so dependency resolution succeeds.
packages/stac/pubspec.yaml
Outdated
| stac_logger: ^1.1.0 | ||
| stac_core: ^1.2.0 | ||
| shared_preferences: ^2.5.4 | ||
| go_router: ^17.0.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
go_router 17.0.1 pub.dev Flutter Dart SDK requirements constraints
💡 Result:
For go_router 17.0.1, the SDK constraints are:
- Flutter SDK: >= 3.32 (minimum supported Flutter version) [2]
- Dart SDK: >= 3.8 (minimum supported Dart version); pub.dev’s “Min Dart SDK” column shows 3.9 for 17.0.1 [2][1]
Sources: pub.dev versions table for min Dart SDK [1] and the package changelog note about updated minimum supported Flutter/Dart [2].
Bump Flutter lower bound to >= 3.32 for go_router 17.0.1 compatibility.
go_router 17.0.1 requires Flutter >= 3.32, but the current constraint is >=1.17.0. This will cause dependency resolution failures for users on older Flutter versions. Update the Flutter constraint to >=3.32.
🤖 Prompt for AI Agents
In `@packages/stac/pubspec.yaml` at line 28, The pubspec declares go_router:
^17.0.1 but the Flutter SDK lower bound is still the old constraint; update the
Flutter SDK constraint in the pubspec's environment section (the Flutter SDK
lower bound) to >=3.32 to match go_router 17.0.1 compatibility so dependency
resolution succeeds.
Summary
Adds an ergonomic Dart API for navigation actions and expands docs so navigation is the main concept and the Navigate action is a focused API reference.
Changes
StacNavigator API (stac_core)
Documentation
Examples
Summary by CodeRabbit
Documentation
New Features
Chores