a method

DocumentBody a(
  1. String name,
  2. dynamic value, {
  3. bool? removeIf,
})

Allows to create a custom HTML attribute, for example, if you can't find the desired one.

Implementation

DocumentBody a(String name, dynamic value, {bool? removeIf}) {
  if (removeIf == true) {
    body.removeAttribute(name);
  } else {
    body.setAttribute(name, value.toString());
  }
  return this;
}