updateLocale static method
Implementation
static void updateLocale(Map<String, dynamic> dataContext) {
if (dataContext["app"] is Invokable) {
var localFunc = (dataContext["app"] as Invokable).getters()["locale"];
if (localFunc is Function) {
var foundLocale = localFunc();
if (foundLocale is UserLocale) {
locale = foundLocale.toLocale();
return;
}
}
}
// if locale is not set, we should clear it out vs using the stale one
locale = null;
}