affectSection method

Future<Map<String, dynamic>> affectSection()

Implementation

Future<Map<String, dynamic>> affectSection() async {
  final income = await getIncomes();
  final expense = await getExpense();
  final savings = await getSavings();
  final getConsumingRat = await getConsumingRate();

  Map<String, dynamic> payload={
    "Income per month": "",
    "Expense & Bills per month": "",
    "Saving per month": "",
    "Consuming rate": "",
  };

  payload={
    "Income per month": "KES: ${format.format(income)}",
    "Expense & Bills per month": "KES: ${format.format(expense)}",
    "Saving per month": "KES: ${format.format(savings)}",
    "Consuming rate": getConsumingRat,
  };
  await saveFinancialStatus("financialStatus",
      payload);
  return payload;
}