attribute<T> method

T? attribute<T>(
  1. String key
)

Gets a custom attribute.

Implementation

T? attribute<T>(String key) {
  final value = _attributes[key];
  return value is T ? value : null;
}