fix(useExpansibleController): add dispose#481
fix(useExpansibleController): add dispose#481Reprevise wants to merge 1 commit intorrousselGit:masterfrom
Conversation
WalkthroughThe PR refactors the Changes
Sequence Diagram(s)sequenceDiagram
participant Widget as Widget Tree
participant Hook as useExpansibleController Hook
participant State as _ExpansibleControllerHookState
participant Controller as ExpansibleController
Widget->>Hook: Create/Initialize
Hook->>State: Create state
State->>Controller: Create controller
State->>Widget: Return controller via build()
Note over Widget,Controller: Hook Active
Widget->>Controller: Use (e.g., add listener)
Note over Widget,Controller: Widget Unmounted/Replaced
Widget->>State: Cleanup triggered
State->>State: dispose() called
State->>Controller: dispose()
Controller->>Controller: Mark as disposed
State->>State: super.dispose()
Note over Controller: Any further access throws FlutterError
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2025-02-19T13:45:17.310ZApplied to files:
📚 Learning: 2025-02-19T13:45:17.310ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (4)
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 |
The
useExpansibleControllerhook wasn't disposing theExpansibleController.Summary by CodeRabbit
Bug Fixes
Tests