getSimpleStudentInfo method
달그락 선생님 화면에 사용할 수 있는 간단한 학생의 정보를 불러올 수 있는 함수입니다.
Implementation
getSimpleStudentInfo(int studentUid, {bool? isExceptionEnter}) async {
try {
Response response = await _dio.get(
"$apiUrl/dalgeurak/user",
options: Options(contentType: "application/json"),
queryParameters: {
"student": studentUid
}
);
Map rawData = response.data['user'];
if (isExceptionEnter != null) { rawData['entered'] = isExceptionEnter; }
return {
"success": true,
"content": DimigoinUser.fromJson(rawData),
};
} on DioError catch (e) {
return {
"success": false,
"content": e.response?.data["message"]
};
}
}