Skip to content

Commit

Permalink
Merge pull request #469 from cunarist/message-interval-docs
Browse files Browse the repository at this point in the history
Add a guide about message interval
  • Loading branch information
temeddix authored Oct 23, 2024
2 parents 033e80e + 2d83bfb commit 924db8c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion documentation/docs/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ There are special comments that you can mark messages with.

## 📢 Channels

`[RUST-SIGNAL]` generates a message channel from Rust to Dart. Use `[RUST-SIGNAL-BINARY]` to include binary data without the overhead of serialization.
`[RUST-SIGNAL]` generates a message channel from Rust to Dart.[^1] Use `[RUST-SIGNAL-BINARY]` to include binary data without the overhead of serialization.

[^1]: It’s important to note that when using `StreamBuilder`, it may only process the latest message from the stream to trigger a widget rebuild on the next render frame. Since widget builders are primarily focused on building widgets, they might skip some messages if multiple messages arrive within a single frame, typically around 16 milliseconds. To ensure that all messages from the stream are handled, you should consider using the `Stream.listen` method instead.

This version maintains your key points while enhancing readability.

```proto title="Protobuf"
// [RUST-SIGNAL]
Expand Down

0 comments on commit 924db8c

Please sign in to comment.