utd_gift_kit 0.1.0 copy "utd_gift_kit: ^0.1.0" to clipboard
utd_gift_kit: ^0.1.0 copied to clipboard

In-room virtual gifts for Flutter: a typed gift protocol and a play queue that serialises overlapping gifts. No plugin dependencies. Transport-agnostic — works in an audio room, a live stream, or any [...]

Changelog #

0.1.0 #

First release.

  • UTDGiftProtocol — typed send/receive over the room's data channel. sendGift(giftId, count, receiverIds, extra) and a giftStream of decoded UTDGiftEvents, not raw JSON. extra is app-defined and passes through verbatim. A malformed gift from any peer is dropped, never thrown — the same channel carries seat updates and chat. The local sender's own gift is emitted once and the room's echo of it ignored, so it never plays twice.
  • UTDGiftPlayList — plays one gift at a time in arrival order, so two gifts arriving together no longer animate on top of each other. Bounded (maxQueueLength), dropping the oldest pending under a gift storm, and with a maxPlayDuration backstop so a player that never reports completion — a failed asset, a widget disposed mid-play — cannot wedge the queue and silence gifts for the rest of the session.
  • UTDGiftOverlay — drives the queue and hands each gift to a builder the app supplies.
  • No animation player and no file cache are shipped, and the package has zero plugin dependencies. Every app already has both; a second copy of either would be dead weight on the user's device.
  • UTDGiftTransport — the package binds to anything that can send and receive maps, so one implementation serves an audio room, a live stream, or an app's own channel.
  • UTDGiftProtocol.encode is public so a SERVER can emit the identical message. That is the correct design when money is involved: sendGift is a display event and is spoofable by construction — the charge belongs on the backend.
0
likes
140
points
56
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

In-room virtual gifts for Flutter: a typed gift protocol and a play queue that serialises overlapping gifts. No plugin dependencies. Transport-agnostic — works in an audio room, a live stream, or any room that can send and receive data.

Homepage

Topics

#gifts #live-streaming #voice-chat #realtime

License

MIT (license)

Dependencies

flutter

More

Packages that depend on utd_gift_kit