I am new to Flutter and I feel like if I could see what the widgetTest is "rendering", as a debug method, things could be a bit easier. I don't fully understand at the moment the mechanics of the widgetTest, but I am wondering if it is possible to capture an actual output render in the middle of the widgetTest.
I am talking about widgetTest not integration test.
I think the package golden_toolkit might be what you are looking for. Instead of using
widgetTestyou will be usingtestGoldens. And you can even compare screenshots if you want to ensure non regression in your UI using the provided methodscreenMatchesGolden.Add in your
pubspec.yaml:Code Sample:
Then run the following command to generate or regenerate your reference images:
You can check the documentation about
testGoldenshere.