createFocusNode method

FocusNode createFocusNode({
  1. String? debugLabel,
  2. bool watch = false,
})
inherited

Implementation

FocusNode createFocusNode({String? debugLabel, bool watch = false}) {
  var node = FocusNode(debugLabel: debugLabel);
  disposers.add(node.dispose);

  if (watch) {
    node.addListener(() {
      safeState(() {});
    });
  }
  return node;
}