2016-04-28 9 views

risposta

11

Aggiungere un file analysis_options.yaml ( .analysis_options vecchia) nella directory in cui il vostro pubspec.yaml è.

aggiungere

analyzer: 
    strong-mode: true 

o se anche voi volete disabilitare implicite-cast e/o implicita-dinamica

analyzer: 
    strong-mode: 
    implicit-casts: false 
    implicit-dynamic: false 

È inoltre possibile attivare linter regolamento integrativo

linter: 
    rules: 
    - always_declare_return_types 

Per tutte le regole di linter supportate, vedere http://dart-lang.github.io/linter/lints/ e Suppress hint about use of protected member

Vedi anche https://www.dartlang.org/guides/language/analysis-options

+1

questo è cambiato in 'analysis_options.yaml' –

+0

@JanVladimirMostert Hai ragione. Grazie mille - risolto. –