sendRequest<T> method
Sends a typed request to the background isolate.
Throws StateError if the worker is not yet initialized.
Implementation
Future<T> sendRequest<T>(String operation, Map<String, dynamic> params) {
if (!_initialized) {
throw StateError('$runtimeType not initialized.');
}
return rpc.sendRequest<T>(operation, params);
}