stream method
Allows to stream SSE events from horizon. Certain endpoints in Horizon can be called in streaming mode using Server-Sent Events. This mode will keep the connection to horizon open and horizon will continue to return responses as ledgers close. See: Stellar developer docs
Implementation
Stream<TradeResponse> stream() {
return streamEvents<TradeResponse>((json) => TradeResponse.fromJson(json));
}