ruleArg function
The argument of a rule at index, for rule builders. Throws
LivrSchemaException when the schema does not have it.
Implementation
Object? ruleArg(List<Object?> args, int index, String ruleName) {
if (index >= args.length) {
throw LivrSchemaException(
'Rule [$ruleName] expects at least ${index + 1} argument(s), '
'got ${args.length}',
);
}
return args[index];
}