native/dart_bridge_proto_utils
library
Constants
-
kStreamDrainMaxMicrotasks
→ const int
-
Maximum number of microtask yields the synchronous-FFI streaming wrappers
use to drain queued
NativeCallable.listener callbacks before deciding
whether to force-close the controller (FLUTTER-IOS-001).
Functions
-
drainPendingStreamCallbacks(bool terminalObserved())
→ Future<void>
-
Helper that yields up to kStreamDrainMaxMicrotasks microtask ticks,
bailing out as soon as
terminalObserved returns true. Centralizes the
FLUTTER-IOS-001 drain loop used by every synchronous-FFI streaming
wrapper (DartBridgeTTS.synthesizeStreamLifecycleProto,
DartBridgeVLM.processImageStreamProto, RunAnywhereSTT.transcribeStream,
RunAnywhereLLM._generateStreamProto).