build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Describes the part of the user interface represented by this widget.

Implementation

@override
Widget build(BuildContext context) {
  if (widget.autofocus && !widget.focusNode.isFocused) {
    scheduleMicrotask(() {
      if (mounted) {
        widget.focusNode.requestFocus();
      }
    });
  }
  return _FocusScopeWidget(focusNode: widget.focusNode, child: widget.child);
}