SendPortRequestX extension
Type-safe isolate communication with request/reply patterns.
Essential for CPU-intensive background work, parallel processing, and isolate-based architectures without blocking the main isolate. Provides structured communication with proper error handling.
- on
Methods
-
request<
R> (String command, {Map< String, Object?> ? data, Duration timeout = const Duration(seconds: 3)}) → Future<R> -
Available on SendPort, provided by the SendPortRequestX extension
Send a typed request and await the response with timeout protection. -
sendCmd(
String command, {Map< String, Object?> ? data}) → void -
Available on SendPort, provided by the SendPortRequestX extension
Send a structured command to the isolate.