[Flutter/Dart]My project doesn’t have `analysis_options.yaml` in the root directory

Dart

A question

I could not find analysis_options.yaml in my project. And I didn't know how Flutter/Dart analyze errors and warnings.

Answer of this question

The project of Flutter/Dart find out analysis_options.yamlin theroot directory at first. If Flutter/Dart finds from there Flutter/Dart will apply the configration in the project.

If Flutter/Dart give up finding it, Flutter/Dart will apply it from a default directory.

Where is a default directory?

I use the version management tool fvm, so the place of analysis_options.yaml is the following path.

/Users/*USERNAME*/fvm/versions/3.16.4/packages/flutter

If you use flutter which is installed in device directly, you can find the following path.

/Users/*USERNAME*/flutter/packages/flutter

Happy coding!

コメント

タイトルとURLをコピーしました