safeGet<T> method

T? safeGet<T>(
  1. dynamic key
)

Implementation

T? safeGet<T>(dynamic key) {
  var value = this[key];
  if (value is T) {
    return value;
  } else {
    return null;
  }
}