Angular Dart Tutorial section 5 - 'self.inject

2019-06-20 14:04发布

问题:

In the Tour of Heroes tutorial, Section 5, main.dart contains the following line:

final InjectorFactory injector = self.injector$Injector;

Is this a typo? It's giving me a warning in VSCode.

回答1:

I was having the same problem, as it complete with no errors, I just added the following on analysis_options.yaml to ignore the error.

analyzer:
  errors:
    undefined_getter: ignore