I want to change the version number when building my Flutter project to web platform. flutter build web --build-name=2.0.0 --build-number=2 I tried the above command but Could not find an option named "build-name". I got the error. Do you have any idea ?
Thank you guys;
I solved this problem another way. I created a PowerShell script task in Azure Pipeline. After the compilation process is complete, it replaces the version field in the version.json file with tfs build version.
$pathToJson = "$(Build.SourcesDirectory)\version.json"
$json = Get-Content $pathToJson | ConvertFrom-Json
$json.version = "$(Build.BuildNumber)"
$json | ConvertTo-Json | set-content $pathToJson