I am facing this issue and didn’t know what to do here
showSnackbar(
context,
text: StatusCodes.absenceCancelResponse[statusCode],
color: Colors.green,
);
class StatusCode
{
static Map<int, String> absenceCancelResponse = {
0: "Absence Request Canceled Successfully",
1: "Error Cancelling Absence Request",
};
}
Everything working fine but I am annoyed by this warning
Do not use BuildContexts across async gaps