run debug with –no-sound-null-safety Flutter

Issue

This Content is from Stack Overflow. Question asked by franzi98

I have to start a debug with –no-sound-null safety because I have a pacakage that doesn’t support it. I have no problem starting my app from shell but with VScode it rember me to start with no sound safety. This is my launch.json file

{
    // Usare IntelliSense per informazioni sui possibili attributi.
    // Al passaggio del mouse vengono visualizzate le descrizioni degli attributi esistenti.
    // Per altre informazioni, visitare: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "autoscrollpdf",
            "cwd": "autoscrollpdf",
            "request": "launch",
            "type": "dart", 
            "args": [
                "--no-sound-null-safety"
            ]
        },
        {
            "name": "autoscrollpdf (profile mode)",
            "cwd": "autoscrollpdf",
            "request": "launch",
            "type": "dart",
            "flutterMode": "profile"
        },
        {
            "name": "autoscrollpdf (release mode)",
            "cwd": "autoscrollpdf",
            "request": "launch",
            "type": "dart",
            "flutterMode": "release"
        }
    ]
}

and this is my shell output when i launch my application with debug:

Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

 - package:chips_choice

For solutions, see https://dart.dev/go/unsound-null-safety
3

FAILURE: Build failed with an exception.

* Where:
Script 'C:UsersvalepOneDriveDocumentiflutterpackagesflutter_toolsgradleflutter.gradle' line: 1156

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?