getConsumingRate function

Future<String> getConsumingRate()

Implementation

Future<String> getConsumingRate()async{
  //total expenses and savings * 100% / income
  int expense = await getExpense();
  int savings = await getSavings();
  int income = await getIncomes();
  int percentage = 100;
  double consumptionRatePercentage = ((expense+savings)*percentage)/income;
  return consumptionName(consumptionRatePercentage.roundToDouble());
}