Status Update
Comments
si...@google.com <si...@google.com> #2
Hi we recently resolved this bug in
I believe it will be in beta05.
br...@monzo.com <br...@monzo.com> #4
Will do—thank you!
Description
Question
Should expect that
onValueChange
might be called any number of times for the same input?Background
We have a custom Money TextField. The
onValueChange
callback parses the text and, if the input is invalid, it vibrates the phone viaHapticFeedback
. Tests for this component provide a fakeHapticFeedback
, which simply counts how many times the phone was told to vibrate. These tests ended up being unexpectedly flaky (failing ~2% of the time on CI).The issue ended up being because
onValueChange
would occasionally get called twice for the same input (SemanticsNodeInteraction.performTextInput
). I've attached the stack traces which show how eachonValueChange
invocation occurred.