From 2d83bfb0f36bc83ff427e0b07d045398803a968d Mon Sep 17 00:00:00 2001 From: Donghyun Kim Date: Wed, 23 Oct 2024 23:31:47 +0900 Subject: [PATCH] Add a guide about message interval --- documentation/docs/messaging.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/documentation/docs/messaging.md b/documentation/docs/messaging.md index 9078b5d2..954d3fd4 100644 --- a/documentation/docs/messaging.md +++ b/documentation/docs/messaging.md @@ -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]