For fix all Analysis issues identified by dart analyzer, you can use the vscode flutter fix all command.

In your project folder, create a .vscode/settings.json file and add the following:

.vscode/settings.json
{
    // ...
   "editor.formatOnSave": true,
   "editor.codeActionsOnSave": {
        "source.fixAll": "explicit",
        "source.organizeImports": "explicit",
    },
}