getMetaData<E> method Null safety

E? getMetaData<E>(
  1. dynamic key
)

Tries to get a value from the metaData map by key.

Returns null if the key is not found in the metaData map.

Implementation

E? getMetaData<E>(dynamic key) {
  if (metaData.containsKey(key)) {
    return metaData[key] as E;
  }
  return null;
}