Commit d6029b3
authored
docs: document recommended state/controller registration pattern for consumer apps (#18)
* docs: document recommended state/controller registration pattern for consumer apps
Add architecture reference (doc/architecture/controllers.md) covering the
lazy singleton pattern, MagicController + MagicStateMixin usage, controller
lifecycle, view binding, and a decision tree for eager vs lazy vs per-view
registration. Add practical getting-started guide (doc/guides/state-management.md)
with end-to-end examples. Update scaffolded app_service_provider.stub with
state registration guidance comments. Add cross-references in service-provider.md.
Closes #17
* fix: address PR #18 review comments
- controllers.md: clarify MagicStateMixin<bool> is most common, not
universal (Newsletter/OTP use untyped); qualify NavigatesRoutes usage;
note NotificationsListView as MagicStatefulView exception; fix
views-and-layouts Related URL (architecture → basics)
- state-management.md: fix "five-state" → "four-state"; fix
_isSubmitting → _isLoading consistency; fix flutter/widgets.dart →
flutter/material.dart for Icons.* usage; rename Pattern B section
to "Manual Access" matching actual content
- README.md: use hosted doc URLs instead of repo-relative paths
- stub: replace local doc path with generic package docs reference1 parent 8a7fc79 commit d6029b3
6 files changed
Lines changed: 1361 additions & 0 deletions
File tree
- assets/stubs/install
- doc
- architecture
- guides
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
382 | 384 | | |
383 | 385 | | |
384 | 386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
76 | 96 | | |
77 | 97 | | |
0 commit comments