getBalance function

Future<int> getBalance()

Implementation

Future <int> getBalance()async{
  int amount = 0;
  int income = await getIncomes();
  int savings = await getSavings();
  int expense = await getExpense();
  amount = income - expense - savings;
  c.userPersonalAnalysis.addIf(!c.userPersonalAnalysis.containsValue(amount), "Total Amount",c.format.format(amount.toString()));
  return amount;
}