translate static method
Implementation
static AccessEvent? translate(ActionModel action,
{Map<String, dynamic>? parameters}) {
if (action is GotoPage) {
return GotoPageEvent(action.app, action.pageID, parameters: parameters);
} else if (action is OpenDialog) {
} else if (action is SwitchApp) {
return SwitchAppWithIDEvent(appId: action.toAppID, goHome: true);
} else if (action is InternalAction) {
switch (action.internalActionEnum) {
case InternalActionEnum.login:
return LoginEvent(
app: action.app,
loginType: LoginType.googleLogin,
);
case InternalActionEnum.logout:
return LogoutEvent(app: action.app);
case InternalActionEnum.goHome:
return GoHome(app: action.app);
default:
return null;
}
}
return null;
}