id property

  1. @nonVirtual
String get id

Implementation

@nonVirtual
String get id => _id;
  1. @nonVirtual
set id (String id)

Setting the component with new ID is basically not recommended. It will change the real HTML ID of this element rendered in DOM too, and will throw ComponentDuplicateIdException when the new ID already exists.

Implementation

@nonVirtual
set id(String id) {
  assertDuplicateId(id);
  elem.id = id;
  baseInnerElement!.id = id;
  _id = id;
}