mirror of
https://github.com/flutter/flutter
synced 2024-09-20 16:52:09 +00:00
c759c22e71
There are two issues in the previous implementation: 1. `_populateDevices` will return the devices from `deviceNotifier` if it had been initialized, assuming that once it's initialized, it has been properly populated. That assumption is not true because calling getters like `onAdded` would initialize `deviceNotifier` without populating it. 2. `deviceNotifier` instance might be replaced in some cases, causing `onAdded` subscribers to lose any future updates. To fix (1), this commit added the `isPopulated` field in `deviceNotifier` as a more accurate flag to determine if we need to populate it. To fix (2), this commit made `deviceNotifier` a final member in `PolingDeviceDiscovery`. |
||
---|---|---|
.. | ||
flutter | ||
flutter_driver | ||
flutter_goldens | ||
flutter_localizations | ||
flutter_test | ||
flutter_tools | ||
flutter_web_plugins | ||
fuchsia_remote_debug_protocol | ||
integration_test | ||
analysis_options.yaml |