calcStockPriceRatio static method
计算股票涨跌比率
Implementation
static String calcStockPriceRatio(
double lastClosePrice, double currentPrice) {
String increase = '0.00';
double diff = currentPrice - lastClosePrice;
if (diff != 0) {
increase = toStringAsFixed(diff / lastClosePrice * 100, 2);
}
return '$increase%';
}