getWarningAndErrors method
Implementation
@override
EditorWarningAndErrorsEntity getWarningAndErrors(
ID nodeID,
BuildContext context,
) {
if (variableID == null) {
return EditorWarningAndErrorsEntity(errors: [
EditorErrorEntity(
message: 'Variable ID is required',
nodeID: nodeID,
),
]);
}
try {
context.getVariableById(
variableID: variableID!, cubitID: cubitID!, stateID: stateID!);
} catch (e) {
return EditorWarningAndErrorsEntity(errors: [
EditorErrorEntity(
message: 'Variable not found',
nodeID: nodeID,
),
]);
}
return EditorWarningAndErrorsEntity.clear();
}