getAttribute method Null safety

Attribute? getAttribute(
  1. String name
)

Implementation

Attribute? getAttribute(String name) =>
    attributes.firstWhereOrNull((a) => a.name == name);