of static method

Returns the FOtpFieldScope from the enclosing FOtpField.

Implementation

static FOtpFieldScope of(BuildContext context) {
  assert(debugCheckHasAncestor<FOtpFieldScope>('$FOtpField', context));
  return context.dependOnInheritedWidgetOfExactType<FOtpFieldScope>()!;
}