I want to use context in constant files e.g
class StatusCodes {
static Map<int, String> overTimeCancelResponse = {
0: "OverTime request Cancel Successfully",
1: "Error Cancelling OverTime Request",
};
}
or
class StatusCodes {
static Map<int, OverTimeResponses> overTimeResponse = {
0: OverTimeResponses(
"Overtime Request Submitted Successfully",
Colours.green,
),
};
}
I am using a language file to change eng to a different Language like this e.g
class StatusCodes {
static Map<int, String> overTimeCancelResponse = {
0: S.0f(context).cancel_request,
1: S.0f(context).error,
};
}
but I am not been able to use context here