I have extracted the relevant code to do screenshots from within tests as advised in this [post](https://codeux.design/articles/automatically-add-device-frames-and-text-to-app-screenshots/). Running the screenshot cli from master branch and the extracted code runs fine with flutter 2.0.2.