Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a guide about message interval #469

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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