Map<String, dynamic>? actionToMap(Action action) { switch (action.actionType) { case ActionType.navigation: return navigationActionToMap(action as NavigationAction); } }