mirror of
https://github.com/flutter/packages.git
synced 2025-06-30 23:03:11 +08:00
Fix a problem with the completer not unregistering the listener.
This commit is contained in:
@ -185,6 +185,7 @@ class PaletteGenerator extends Diagnosticable {
|
||||
Timer loadFailureTimeout;
|
||||
void imageListener(ImageInfo info, bool synchronousCall) {
|
||||
loadFailureTimeout?.cancel();
|
||||
stream.removeListener(imageListener);
|
||||
imageCompleter.complete(info.image);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user