writeInjectorGetMethod method

ClassMethod writeInjectorGetMethod()

Implementation

o.ClassMethod writeInjectorGetMethod() {
  final statements = providers?.build() ?? [];
  return o.ClassMethod(
    'injectorGetInternal',
    [
      o.FnParam(InjectMethodVars.token.name!, o.DYNAMIC_TYPE),
      o.FnParam(InjectMethodVars.nodeIndex.name!, o.INT_TYPE),
      o.FnParam(InjectMethodVars.notFoundResult.name!, o.DYNAMIC_TYPE)
    ],
    _addReturnValueIfNotEmpty(statements, InjectMethodVars.notFoundResult),
    o.DYNAMIC_TYPE,
    null,
    [o.importExpr(Identifiers.dartCoreOverride)],
  );
}