Check out the readme of https://pub.dartlang.org/packages/analyzer
.analysis_options
analyzer: strong-mode: true