tanutapi / dart_meteor

A Meteor DDP library for Dart/Flutter developers.
Other
37 stars 15 forks source link

fix: set default collection data #59

Closed JulioWar closed 2 years ago

JulioWar commented 2 years ago

This changes are related to the issue #58.

This issue happen when the collection is empty. For some reason the subscription is set to ready but the server doesn't emit a added event or anything like that because there is nothing to add. When using StreamBuilder, the snapshot keeps waiting on the data.

I fixed just by adding an empty map when preparing the collection for the first time.

Feel free to give me some feedback or suggetion to improve the solution.