I recently tried building my flutter web application from a branch other than master (I have a separate branch for my web app as I have tweaked the UI/functionality a bit vs. the mobile versions). I checked out to my web branch, but the build command would only compile what was in my master branch.
After merging my web branch into master I was able to build and deploy the latest version.
I would expect the flutter build web CLI command to build whichever branch is checked out, rather than always building master.
Likely related issues:
#75762
#55008
Thanks!