Closed ChizobaAmadi closed 6 months ago
I actually think I can remove the completer on future versions because of future signal not extending stream signal.
There is a conflict on the completed vs the stream.
Thanks for finding this!
Ok ! Sounds good. Really nice package btw
This should have fixed it: https://github.com/rodydavis/signals.dart/pull/219
I was debugging an issue and observed that an async signal can temporarily propagate an invalid state where
isCompleted
is false and the data is set. This is because the library sets the value before setting the _completer:Widget:
Logs flutter: isCompleted: false type: AsyncLoading<Map<String, List>> hasValue: false
flutter: isCompleted: false type: AsyncData<Map<String, List>> hasValue: true
After a hot reload, I can see
isCompleted
is set to true;I'm not sure if this is a desired behaviour, as it can lead to errors for anyone checking
isCompleted
instead od using the map function.