escamoteur / watch_it

MIT License
103 stars 8 forks source link

Allow watching nullable streams #9

Closed yangsfang closed 10 months ago

yangsfang commented 10 months ago

A Stream<int?> can have valid successful value of null inside the stream.

When using watchStream in watch_it and get_it_mixin, it will throw an error due to an assertion at https://github.com/escamoteur/watch_it/blob/617e8d29ef211cdc69f79594e83966b63228beeb/lib/src/watch_it_state.dart#L336.

The expected behavior is for watch it to not throw this error, and to trigger a rebuild with a null value for this stream.

escamoteur commented 10 months ago

I think I fixed the same thing for the normal watch just recently