Migration guide

Follow these steps to migrate your Flutter project to use the latest recommended
lints from package:flutter_lints:

Add a dev_dependency on package:flutter_lints to your project’s pubspec.yaml
by running flutter pub add --dev flutter_lints in the root directory of the
project.

Create an analysis_options.yaml file in the root directory of your project
(next to the pubspec.yaml file) with the following content:

include

package:flutter_lints/flutter.yaml

The newly activated lint set may identify some new issues in your code. To find
them, open your project in an IDE with Dart support or run flutter analyze
on the command line. You may be able to fix some of the reported issues
automatically by running dart fix --apply in the root directory of your
project.

Existing custom analysis_options.yaml file

Customizing the lints