addExpense function

Future addExpense(
  1. Map<String, dynamic> payload
)

Implementation

Future addExpense(Map<String, dynamic> payload) async {
  String id = await getUserID();
  payload.addAll({"userID": id});
  final addIncome =
  await pocketBase.collection("expenses").create(body: payload);
  print(addIncome);
}