addStudent method
Implementation
Future<int> addStudent(
DateTime date,
String gender,
int session,
) async {
final Either<String, Map<String, dynamic>> res = await mappingPostRequest(
"/students",
<String, dynamic>{
"date": date.toIso8601String(),
"gender": gender,
"session": session,
},
).run();
return res.getOrElse((String l) => <String, dynamic>{})["id"];
}