checkValidity static method
void
checkValidity(
- MethodInvocation node,
- List<
Expression> arguments, - String? outerName,
- List<
FormalParameter> outerArgs, { - bool nameAndArgsGenerated = false,
- bool examplesRequired = false,
override
Verify that this looks like a correct Intl.message invocation.
Implementation
static void checkValidity(
MethodInvocation node,
List<Expression> arguments,
String? outerName,
List<FormalParameter> outerArgs, {
bool nameAndArgsGenerated = false,
bool examplesRequired = false,
}) {
if (arguments.first is! StringLiteral) {
throw MessageExtractionException(
'Intl.message messages must be string literals',
);
}
Message.checkValidity(
node,
arguments,
outerName,
outerArgs,
nameAndArgsGenerated: nameAndArgsGenerated,
examplesRequired: examplesRequired,
);
}