You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The doc of useTextEditingController suggests using useEffect to update the TextEditingController.text whenever a provided ValueListenable changes.
But, When the provided ValueListenable updates the TextEditingController.text for the second time it'll throw an exception: setState() or markNeedsBuild() called during build
Suggestion:
Delaying the update by a frame using Future.microtask inside useEffect fixes the issue.
The text was updated successfully, but these errors were encountered:
Hello,
The doc of useTextEditingController suggests using
useEffect
to update the TextEditingController.text whenever a provided ValueListenable changes.But, When the provided ValueListenable updates the TextEditingController.text for the second time it'll throw an exception:
setState() or markNeedsBuild() called during build
Suggestion:
Delaying the update by a frame using
Future.microtask
inside useEffect fixes the issue.The text was updated successfully, but these errors were encountered: