Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pathBuilder into expectGolden tester function #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mjablecnik
Copy link

For custom paths for golden files I added pathBuilder into expectGolden tester function.

@@ -70,26 +70,26 @@ extension Adaptive on WidgetTester {
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,
String Function()? pathBuilder,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you choose a function without argument for parameter, instead of a simple String? ?
Ex:

String? path

instead of:

String Function()? pathBuilder,

Also if this parameters is optional, we should add the default value in the documentation

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this one month ago, and I really don't remember why I used a function instead of a string.
But when I see it now, I think it is possible to use a string there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants