addNewGoal function

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

Implementation

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