1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Dart analyzer error for missing parameter type in function declaration

Discussão em 'Mobile' iniciado por Stack, Setembro 27, 2024 às 14:23.

  1. Stack

    Stack Membro Participativo

    I just noticed that it is perfectly possible to misspell if and not get any error.

    i( confirm ){
    save();
    }



    This results in a warning about "The declaration 'i' isn't referenced.", which is easy to miss. And looking quickly at the code, it is also easy to miss.

    Is there any option for the Dart analyzer that specificially targets parameters in function declarations?

    I am aware of

    analyzer:
    language:
    strict-casts: true
    strict-inference: true
    strict-raw-types: true


    but they don't really fit this use case, and enabling them on legacy projects results in thousands of "errors".

    I specifically want to target only function declarations with parameters which don't have types.

    Continue reading...

Compartilhe esta Página