shortTotalProfit method

String shortTotalProfit(
  1. double totalProfit
)

Implementation

String shortTotalProfit(double totalProfit) {
  int thousandsValue = totalProfit ~/ 1000;
  String formattedProfit = '${thousandsValue}K';
  return formattedProfit;
}