update method

void update({
  1. TextEditingController? controller,
  2. FocusNode? focusNode,
  3. String? text,
})

Call this during State.didUpdateWidget() if your state's widget has a controller or focusNode.

Also call it during State.initState() if these values weren't passed to the constructor.

If text is passed, it will become the (given or current) controller's text unless it matches the controller's initial value.

Implementation

void update({
  TextEditingController? controller,
  FocusNode? focusNode,
  String? text,
}) {
  _updateController(controller, text);
  _updateFocusNode(focusNode);
}