applicationConvenienceFood method
학생이 간편식을 신청하는 함수입니다.
Implementation
applicationConvenienceFood(MealType mealType, ConvenienceFoodType foodType) async {
try {
Response response = await _dio.post(
"$apiUrl/dalgeurak/convenience",
options: Options(contentType: "application/json"),
data: {"time": mealType.convertEngStr, "food": foodType.convertEng},
);
return {
"success": true,
"content": response.data
};
} on DioError catch (e) {
return {
"success": false,
"content": e.response?.data["message"]
};
}
}