send method
Implementation
Stream? send(BuildContext? context, dynamic command,
{String waitingText = "Waiting..."}) {
// handle nested send
if (context != null) {
if (inProgressDialogs.isNotEmpty) {
// wait for other dialogs to finish
var prevs = Future.wait(inProgressDialogs.map((d) => d.future));
return Stream.fromFuture(
prevs.then((_) => _sendUI(context, waitingText, command)?.first));
} else {
return _sendUI(context, waitingText, command);
}
} else {
return runtime.send(command);
}
}