getFormKey method

GlobalKey<FormFieldState> getFormKey(
  1. String attribute
)

Implementation

GlobalKey<FormFieldState> getFormKey(String attribute) {
  late GlobalKey<FormFieldState> key;
  if (_formKeys[attribute] == null) {
    key = GlobalKey<FormFieldState>();
    _formKeys[attribute] = key;
  }
  key = _formKeys[attribute]!;
  return key;
}