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.