lint_quido style: miquido lints

This is collection of Flutter lints that we use and follow in Miquido Software development company.

This is strict, large and robust collection because we strive for high quality code, good practices and we want follow the same coding style in all our mobile apps.

And we just looooove lots of lints. :blue_heart:



For a start please make sure you work with latest version of Flutter & Dart.

  sdk: ">=3.2.2 <4.0.0"
  flutter: ^3.16.2

Then add a dev dependency in your pubspec.yaml: From command line:

flutter pub add --dev lint_quido
pub get

or directly in pubspec.yaml

  lint_quido: 1.16.0

At last in analysis_options.yaml add:

include: package:lint_quido/miquido_lints.yaml

And that is all folks! You are good to go!

Excluding and suppressing rules

If for some reason you don't want follow some lints, you can exclude or suppress them. You can always check example.


To completely exclude rule from linter, modify analysis_options.yaml:

  errors: #linters from flutter sdk
    unawaited_futures: ignore

  rules-exclude: #linters from dart_code_metrics
    - prefer-last

In code add ignore comments

  • at line level (comment directly above the specific line of code):
// ignore: public_member_api_docs
  • at file level (comment at the top of the file):
// ignore: public_member_api_docs


To analyze your code in terminal use this commands:

# Default flutter analyze, mandatory to pass!
flutter analyze

# Dart metrics analyze, not mandatory to pass!
# Also it calculate total technical debt of your project.
dart run dart_code_metrics:metrics analyze lib

# Find unused files in your code! Nice to keep eye on this one.
dart run dart_code_metrics:metrics check-unused-files lib

# You can check if all nullable variables are necessary in your code with
dart run dart_code_metrics:metrics check-unnecessary-nullable lib

# find unused line of codes
dart pub run dart_code_metrics:metrics check-unused-code lib

Here you can find documentation about dart metrics commands.


Sometimes working with cutting-edge versions might cause dependencies incompatibilities. For example lint_quido do not want to cooperate with test_api package or analyzer package and so on. To overcome this use older version of package or try using dependency_overrides in your pubspec.yaml file.

In your pubspec add:

  test_api: 0.4.18

Additional information

This is set of sources from which we are getting our linters and about good practices in Dart/Flutter:

About Miquido