mirror of
https://github.com/flutter/samples.git
synced 2026-06-25 15:49:43 +00:00
Adds a comment explaining why `HomeViewModel` is not disposed in the Compass sample. This clarifies that the current implementation is safe because the ViewModel does not manage disposable resources. It also highlights that in real applications, proper lifecycle management is required when working with streams, controllers, or subscriptions. Fixes https://github.com/flutter/samples/issues/2788 ## Pre-launch Checklist * [x] I read the [[Flutter Style Guide](https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md)] recently, and have followed its advice. * [x] I signed the [[CLA](https://cla.developers.google.com/)]. * [ ] I have added sample code updates to the [[changelog](https://chatgpt.com/c/CHANGELOG.md)]. * [x] I updated/added relevant documentation (doc comments with `///`). <!-- Links --> [Flutter Style Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md [CLA]: https://cla.developers.google.com/ [changelog]: ./CHANGELOG.md --------- Co-authored-by: Eric Windmill <eric@ericwindmill.com>
5.0 KiB
5.0 KiB