adaptive_test icon indicating copy to clipboard operation
adaptive_test copied to clipboard

Expose `version` parameter from `matchesGoldenFile` in `expectGolden`

Open gawi151 opened this issue 1 year ago • 0 comments

Hi, I would like to propose exposing version param in expectGolden and pass it under the hood into matchesGoldenFile. Parameter would be optional so this won't be a breaking change in the API of expectGolden but would allow us to use different version of golden files.

before

Future<void> expectGolden<T>(
    WindowConfigData windowConfig, {
    String? suffix,
    Key?
        byKey, // Sometimes we want to find the widget by its unique key in the case they are multiple of the same type.
    bool waitForImages = true,
  })

after

Future<void> expectGolden<T>(
    WindowConfigData windowConfig, {
    String? suffix,
    Key?
        byKey, // Sometimes we want to find the widget by its unique key in the case they are multiple of the same type.
    bool waitForImages = true,
    int? version,
  })

gawi151 avatar Jul 31 '24 14:07 gawi151