getVariableById<T> method

VariableInfoEntity getVariableById<T>({
  1. required ID variableID,
  2. required ID cubitID,
  3. required ID stateID,
})

Implementation

VariableInfoEntity getVariableById<T>({
  required ID variableID,
  required ID cubitID,
  required ID stateID,
}) {
  final variableInfo = appCubit.getVariableById(
      cubitID: cubitID, stateID: stateID, variableID: variableID);
  assert(variableInfo.variable is T,
      'Variable with id $variableID is not of type $T');
  return variableInfo;
}