get method

EasyAttribute<Object?>? get(
  1. String key, {
  2. Set<String> altKeys = const {},
})

Returns the attribute that matches with the key or the altKey

Implementation

EasyAttribute? get(String key, {Set<String> altKeys = const {}}) {
  return attributes[key] ??
      attributes[altKeys.firstWhereOrNull(
            (e) => attributes[e] != null,
          ) ??
          ''];
}