flutterdartlinter

How to disable strict_raw_type and inference_failure_on_function_return_type from analysis_option.yaml on Flutter?


I have a lot of warnings with strict_raw_type and inference_failure_on_function_return_type from the dart analyzer.

I tried to pass to the analysis_option.yaml the rules:

linter:
  rules:
    strict_raw_type: false
    inference_failure_on_function_return_type: false

But it says that are not recognized as lint rules.

How can I disable these rules?

I use very_good_analysis package for lints.


Solution

  • I found the solution:

    I added under analyzer:

      language:
        strict-raw-types: false
    

    And also I added some error rules under analyzer:

      errors:
        inference_failure_on_function_return_type: ignore
        inference_failure_on_untyped_parameter: ignore
        inference_failure_on_instance_creation: ignore
        inference_failure_on_function_invocation: ignore