getVolume method
Returns StockQuote
instance after getting currentPrice
,
dayHigh
and dayLow
from the given tickers. If invalid ticker
is found, returns a StockQuote
instance with parameters
initialized to null.
Implementation
Future<StockQuote> getVolume({required StockInfo stockInfo}) async {
try {
StockQuote stockQuote = await stockInfo.getStockVolume();
return stockQuote;
} catch (e) {
return StockQuote(
ticker: stockInfo.ticker,
);
}
}