centrifugal / centrifuge-dart

Dart (Flutter) client SDK for bidirectional communication with Centrifugo and Centrifuge-based server over WebSocket
https://pub.dartlang.org/packages/centrifuge
MIT License
102 stars 29 forks source link

Add offset field and expand event models #38

Closed Holofox closed 2 years ago

Holofox commented 4 years ago

Hello!

I added an offset field and extended event models, and the sequence and gen fields are marked as deprecated. These changes work well on the latest Centrifuge. :)

FZambia commented 4 years ago

Hello, will take a closer look very soon. One thing I want to note is that I'd like to avoid exposing seq and gen in libraries that did not expose seq and gen before, i.e. - only work with offset. The need to use Centrifugo >= 2.5.0 with v3_use_offset option to work with history can be reflected in readme I suppose.

The reason is that mobile devices can't be easily updated - there are always clients with old application version. And migration from seq and gen to offset will be painful for users.

Holofox commented 4 years ago

@FZambia, thanks for considering. Yes you are right.

Holofox commented 3 years ago

@FZambia, sorry for the delay, I hope I understood you correctly when I removed backward compatibility with deprecated fields.

Please see the changes and update the readme as you see fit.