chore(examples): validate get-free stacked_services (PR #46)#1191
Open
ferrarafer wants to merge 4 commits into
Open
chore(examples): validate get-free stacked_services (PR #46)#1191ferrarafer wants to merge 4 commits into
ferrarafer wants to merge 4 commits into
Conversation
Migrate navigator_example and router_example to the modern Flutter Android toolchain so they build on current JDKs again, and fix the Dart/test breakages this surfaced. Android (both examples): - Gradle 5.6.x -> 8.7, AGP 3.5.0 -> 8.6.0, declarative plugins DSL - replace dead jcenter() with mavenCentral(), drop android.enableR8 - add namespace, remove manifest package=, add android:exported - backfill namespace + pin JVM target for legacy plugins via subprojects Dart: - update onError overrides to (error, stackTrace) signature - map logger 2.x calls back to the resolved 1.x API router_example integration test: - present NonReactiveView as a full-screen route (was a non-opaque modal bottom sheet that left the Home FAB onstage -> 2 FABs) - seed a valid form email so validation no longer blocks navigation to the bottom-nav view Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NbVU8hfegQuqXaszwsmjji
Regenerate router_example's generated files with the repaired stacked_generator so they match generator output instead of the hand-edited recovery versions, and migrate the form to the current validation API. - app.locator.dart now registers FactoryService (factory params) and the InitializableSingleton services (SharedPreferencesService, NativeActionsService) via the await-init pattern - app.router.dart no longer duplicates HistoryView navigation helpers - example_form_view.form.dart emits a single custom-controller helper - saveData() now calls validateForm() before checking isFormValid; newer generated forms no longer validate implicitly inside isFormValid Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NbVU8hfegQuqXaszwsmjji
Instead of patching the stale local generator (1.3.3), update the local path dependencies to their current releases and regenerate against them: - stacked_generator 1.3.3 -> 2.0.4 (already has InitializableSingleton, factory-param detection, and dedup fixes for analyzer 14) - stacked_crashlytics -> 0.2.2 (logger ^2.5.0), which resolves the logger 1.x/2.x conflict that previously forced logger 1.4.0 With logger now resolving to 2.x, revert the interim 1.x API workarounds: - example_form_viewmodel: log.f (was log.wtf) - shared_preferences_service: _log.t (was _log.v) - app.logger.dart regenerates to the 2.x PrettyPrinter API Both example integration tests pass end-to-end against the updated toolchain. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NbVU8hfegQuqXaszwsmjji
Removes the leftover `get: ^4.6.3` direct dependency from both example apps. stacked_services (Stacked-Org/services#46) reimplements all services on native Flutter APIs and removes get, and neither example imports package:get directly. Integration tests pass on both apps. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019CMCmDQ72hkkmvGnsSu8n9
LCOV of commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the example apps to consume and validate the
get-freestacked_servicesfrom Stacked-Org/services#46 (refactor: remove the get dependency).Both examples already reference
stacked_servicesvia adependency_overridespath, so the substantive change here is dropping the now-unusedget: ^4.6.3direct dependency from each example'spubspec.yaml. Neither example importspackage:getin Dart code — they rely only on the preserved public API (StackedService.navigatorKey,StackedService.nestedNavigationKey,StackedRouter), so PR #46's breaking changes (ownednavigatorKey, no-openableLog/popGesture) don't affect them.Verification
Integration tests run on an Android emulator against the local services checkout (in sync with PR #46):
All tests passed! 🎉All tests passed! 🎉Both flows exercise navigation/back, stream sources, the form (date picker, dropdown, validation), and nested bottom-nav — covering the services PR #46 reimplemented natively.
Notes
This branch also carries earlier example/QA commits (Android build modernization,
stacked_generator2.0.4 adoption, router_example regeneration).🤖 Generated with Claude Code