getVariable method

JsonVar getVariable(
  1. BuildContext context,
  2. CMSAction action
)

Implementation

JsonVar getVariable(BuildContext context, CMSAction action) {
  final variable = context
      .getVariableById(
        variableID: action.variableID,
        cubitID: action.cubitID,
        stateID: action.stateID,
      )
      .variable as JsonVar?;
  if (variable == null) throw Exception('No variable found');
  return variable;
}