visitSimpleEventHandler method
Implementation
@override
o.Expression visitSimpleEventHandler(ir.SimpleEventHandler handler, [_]) {
var expr = _convertToExpression(handler);
if (expr is o.InvokeMethodExpr) {
var tearOff = _tearOffSimpleHandler(expr);
return _wrapHandler(tearOff, handler.numArgs);
}
final message = 'Expected method for event binding.';
throw BuildError.withoutContext(
handler.sourceSpan?.message(message) ?? message,
);
}