fieldKey<T> method

GlobalKey<FormFieldState<T>> fieldKey<T>(
  1. TypedId<T> fieldId
)

Get or create a GlobalKey for a form field

Implementation

GlobalKey<FormFieldState<T>> fieldKey<T>(TypedId<T> fieldId) {
  return _fieldKeys.putIfAbsent(
    fieldId.id,
    () => GlobalKey<FormFieldState<T>>(debugLabel: fieldId.id),
  ) as GlobalKey<FormFieldState<T>>;
}