Skip to content

chore(examples): validate get-free stacked_services (PR #46)#1191

Open
ferrarafer wants to merge 4 commits into
masterfrom
qa/remove-get-dependency
Open

chore(examples): validate get-free stacked_services (PR #46)#1191
ferrarafer wants to merge 4 commits into
masterfrom
qa/remove-get-dependency

Conversation

@ferrarafer

Copy link
Copy Markdown
Contributor

Summary

Updates the example apps to consume and validate the get-free stacked_services from Stacked-Org/services#46 (refactor: remove the get dependency).

Both examples already reference stacked_services via a dependency_overrides path, so the substantive change here is dropping the now-unused get: ^4.6.3 direct dependency from each example's pubspec.yaml. Neither example imports package:get in Dart code — they rely only on the preserved public API (StackedService.navigatorKey, StackedService.nestedNavigationKey, StackedRouter), so PR #46's breaking changes (owned navigatorKey, no-op enableLog/popGesture) don't affect them.

Verification

Integration tests run on an Android emulator against the local services checkout (in sync with PR #46):

  • navigator_exampleAll tests passed! 🎉
  • router_exampleAll 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_generator 2.0.4 adoption, router_example regeneration).

🤖 Generated with Claude Code

ferrarafer and others added 4 commits June 22, 2026 12:03
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
@github-actions

Copy link
Copy Markdown

LCOV of commit 164aaa8 during Test Package #142

  lines......: 7.6% (279 of 3688 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

Full coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant