mirror of https://github.com/flutter/samples.git
refactor: remove redundant notifyListeners in HomeViewModel deleteBooking (#2839)
Removes redundant notifyListeners() call from _deleteBooking(). The method is executed through Command, which already manages its own notifyListeners lifecycle. This change ensures that HomeViewModel only notifies listeners when its internal state (_bookings) changes, avoiding unnecessary updates. Fixes https://github.com/flutter/samples/issues/2746 ## Pre-launch Checklist - [x] I read the [Flutter Style Guide] recently, and have followed its advice. - [x] I signed the [CLA]. - [ ] I have added sample code updates to the [changelog]. - [ ] 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>pull/2866/head
parent
effe13307c
commit
659acd0690
Loading…
Reference in new issue