Skip to content

Commit

Permalink
feat: add navigate to view group action
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothvino42 committed Oct 5, 2023
1 parent 27fba9c commit 9b70228
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/framework/action.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ class NavigateScreenAction extends BaseNavigateScreenAction {
}
}

class NavigateViewGroupAction extends EnsembleAction {
NavigateViewGroupAction({dynamic viewIndex}) : _viewIndex = viewIndex;

final dynamic _viewIndex;

factory NavigateViewGroupAction.from({Map? payload}) {
return NavigateViewGroupAction(viewIndex: payload?['title']);
}

@override
Future<void> execute(BuildContext context, ScopeManager scopeManager) {
return Future.value(null);
}
}

class NavigateModalScreenAction extends BaseNavigateScreenAction {
NavigateModalScreenAction({
super.initiator,
Expand Down Expand Up @@ -830,6 +845,7 @@ class CheckPermission extends EnsembleAction {
enum ActionType {
invokeAPI,
navigateScreen,
navigateViewGroup,
navigateModalScreen,
showBottomModal,
dismissBottomModal,
Expand Down Expand Up @@ -910,6 +926,9 @@ abstract class EnsembleAction {
if (actionType == ActionType.navigateScreen) {
return NavigateScreenAction.fromYaml(
initiator: initiator, payload: payload);
} else if (actionType == ActionType.navigateViewGroup) {
return NavigateModalScreenAction.fromYaml(
initiator: initiator, payload: payload);
} else if (actionType == ActionType.navigateModalScreen) {
return NavigateModalScreenAction.fromYaml(
initiator: initiator, payload: payload);
Expand Down

0 comments on commit 9b70228

Please sign in to comment.