flutterdata / flutter_data

Seamlessly manage persistent data in your Flutter apps
MIT License
410 stars 31 forks source link

HasMany - insertAt #195

Closed vd3d closed 1 year ago

vd3d commented 1 year ago

Hi,

On the class HasMany, we have the "add" method... but there is no "insertAt" method. So, how can we insert something at a specific index (order matter here) ?

Thanks

frank06 commented 1 year ago

Relationship is backed by a Set, so it does not have order assurances. I suggest you add a property to your model to be sorted by (it could be transient)