setID method

void setID(
  1. Object? id
)
inherited

Implementation

void setID(Object? id) {
  if (id != null) {
    var idStr = parseString(id, '')!.trim();
    if (idStr.isNotEmpty) {
      if (id is String) {
        id = idStr;
      }

      this.id = id;
      _content!.id = idStr;
      return;
    }
  }

  this.id = null;
  _content!.removeAttribute('id');
}