-
Notifications
You must be signed in to change notification settings - Fork 28.5k
Fix#165741 #166190
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
base: master
Are you sure you want to change the base?
Fix#165741 #166190
Conversation
@ujjwaltwitx Can you make the changes that @dkwingsmt requested ? |
Hey, sorry for the delay. I was a bit busy because of work. Will push the changes by this saturday. |
Great |
…y and refactors the previous code change
@dkwingsmt I have pushed the changes. |
await tester.pumpWidget(buildWidget(controller1)); | ||
expect(controller1.value, 0.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great so far! Can you test that the controller works? For example by making the animation move forward.
…idUpdateWidget function and adds test.
expect(controller1.status, AnimationStatus.forward); | ||
|
||
await tester.pump(const Duration(milliseconds: 500)); | ||
expect(controller1.value, closeTo(0.5, 0.01)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verifying the controller's value
does not necessarily verifies that the provided controller controls the animation, because the controller might have been only tied to the vsync and some internal controller is still controlling the animation.
My suggestion:
- Without calling
controller1.forward()
, pump some duration. - Then
forward
. - Then pump another 200ms, and verify with a golden file. (See
matchesGoldenFile
).
Or if you can think of some other ways that demonstrates the effect of the controller :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will make the required changes.
Update's ? |
@ujjwaltwitx Do you have any updates on this ? |
fixes issue #165741
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.