The reason for doing this is explained in this issue
How do we set a diff tolerance levels for the golden test ? There is already PR merged for this. But I am not sure how I use those API in my tests.
Currently, I have got a golden test matcher like this.
await expectLater(find.byType(MyTestWidget),
matchesGoldenFile('my_test_widget.png'));
How do I set a diff tolerance levels for this test ?