name property Null safety

String name
inherited

Non-unique identifier, used to give friendly names to elements in the hierarchy. Runtimes provide an API for finding components by this name.

Implementation

String get name => _name;
void name=(String value)
inherited

Change the _name field value. nameChanged will be invoked only if the field's value has changed.

Implementation

set name(String value) {
  if (_name == value) {
    return;
  }
  String from = _name;
  _name = value;
  if (hasValidated) {
    nameChanged(from, value);
  }
}